- PHP and MySQL: Single Article

PHP and MySQL: Single Article

Single article view

Each link in index.php leads to detail.php with an extra id parameter. We can use this information to retrieve a single article from the database.

Copy the content of detail.php from the Exercise Materials archive, and populate the new detail.php, complete with styling:

Note that the WHERE clause allows us to be more specific with our retrieval.

Congratulations: we now have a microblog with a capacity to read and write to a live database.

Screencast Recording