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.
https://www.dropbox.com/scl/fi/5eykkqz8492jpdkjfnuyz/Page-4.mov?rlkey=zrjzbdf37fx2br3skiq6k0lje&dl=0