Web and email hosting - If no articles are published, let the user
If no articles are published, let the user know. This is optional, of course. If this were part of a larger page, such as a portal application, then you might simply want to put something else in place of the article list. if (mysql_num_rows($result) == 0) { echo
n ; echo There are currently no articles to view.n ; Go through each article ID retrieved, and display the articles (trimmed) on the page: } else { while ($row = mysql_fetch_array($result)) { outputStory($row[ article_id ], TRUE); } } Then you can tidy up afterward: require_once footer.php ; ?> You may have noticed that we left out two pages, login.php and forgotpass.php. They are important pages, of course, but are mostly simple HTML. The includes at the top and bottom for header.php and footer.php are the only PHP. We re sure you can figure out how those two pages work. Try It Out Account Creation Now you are going to create a script that will allow guests to your CMS to create new accounts for themselves. 1. Create this new file, and save it as useraccount.php: If you are looking for affordable and reliable webhost to host and run your business application visit our ftp web hosting services.