WinnipegWideWeb Demo Blog

A clean demo blog: PDO, prepared statements, and a block editor that feels familiar without being heavy.

Default post Published

Building a blog engine in plain PHP

A clean demo blog: PDO, prepared statements, and a block editor that feels familiar without being heavy.

This demo is built for WinnipegWideWeb style projects: practical, readable, and easy to extend.

It stores defaults in default_posts, and your edits in instance_posts tied to your session instance.

PDO connection

<?php $pdo = new PDO('mysql:host=localhost;dbname=qhdswamy_www_demo_blog;charset=utf8mb4','qhdswamy_demo','hidden123',[PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION]);

The trick

When you edit a default post, the app creates an override row that points back to the default via base_default_id.

  • Default stays untouched
  • Your override wins in your session
  • Logout wipes overrides

Quick tour

You might also like

Suggested based on the post you opened.

1 min read · Published

WinnipegWideWeb: platform notes

A running log of the kind of building blocks that make a new platform feel fast and sturdy.

1 min read · Published

Databases: the habits that save you later

Indexes, slugs, and prepared statements. The boring stuff that prevents future pain.

1 min read · Published

HTML that stays maintainable

Small patterns that keep templates clean: includes, partials, and predictable classes.