O'Reilly logo

PHP and MySQL for Dynamic Web Sites: Visual Quickpro Guide, Second Edition by Larry Ullman

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

Creating the Basic Pages

Before I get into the heart of the Web application (the content management itself), I need to create two more pages. One will be index.php and will act as the home page for the site. The second will be mysql_connect.php, a script that connects to MySQL and selects the database to be used (see the “Database Scheme” sidebar in the next section for more information about the database).

To make the home page

1.
Create a new PHP script in your text editor (Script 12.3).
<?php # Script 12.3 - index.php
Script 12.3. The application’s home page (add meaningful content as needed).

2.
Set the page title and include the HTML ...

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