O'Reilly logo

Learning PHP, MySQL, and JavaScript by Robin Nixon

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

index.php

This file is a trivial file but necessary nonetheless to give the project a home page. All it does is display a simple welcome message. In a finished application, this would be where you sell the virtues of your site to encourage signups.

Incidentally, seeing as all the MySQL tables have been created and the include files saved, you can now load Example 20-4, index.php, into your browser to get your first peek at the new application. It should look like Figure 20-1.

The main page of the site
Figure 20-1. The main page of the site
Example 20-4. index.php
<?php // index.php
include_once 'rnheader.php';

echo "<h3>Home page</h3>
    Welcome, please Sign up and/or Log in to join in.";
?>

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required