Web page design - if (mysql_num_rows($result) == 0) { echo No

if (mysql_num_rows($result) == 0) { echo No published articles available ; } else { while ($row = mysql_fetch_array($result)) { echo
n ; echo . htmlspecialchars($row[ title ]) . (published . date( F j, Y ,strtotime($row[ date_published ])) . )

n ; echo

n ; } } Then load the footer. It is only a few lines of HTML for now, but some day you will want to put a menu, or perhaps a copyright line. The great thing is, even if your site uses 300 pages, you will have to add that information in only one place: footer.php. ?>

Try It Out Search The final thing you are going to add is a simple search feature. Using the power of the full-text searching in MySQL, you can easily put a keyword search field on each page, and show the results here. 1. Create search.php:

Search Results

n ; if ($result and !mysql_num_rows($result)) { echo

No articles found that match the search terms.

n ; } else { while ($row = mysql_fetch_array($result)) { 477 Building a Content Management System
You need excellent and relaible webhost company to host your web applications? Then pay a visit to Inexpensive Web Hosting services.

Leave a Reply