[view source]

This page is a companion to the TechWeb article, Make Your Site Dynamic With PHP. You should read along with that article and look at the code samples available here. These code samples are also available for download as a ZIP or tar.gz archive.

The initial script will just include a PHP file where the filename matches the current date.

It's simple to modify your script to take a date from the user.

Some error checking rejects dates that aren't in YYYY-MM-DD format.

We add some functions to give us links to the next and previous web log entries.

Finally, we use these links to enrich the user navigation for our web log.


At the conclusion of the article, I offered two simple exercises: allow the user to view your web log a month at a time, and allow the user to send you mail from any page in the log. Samples for these two functions are available, if you're stumped: month.phtml and mail.phtml.

*/ ?>

If you have any questions about this article, drop me a line. Be sure to read the excellent online PHP manual first, though. Your question may have already been answered.