Web Design and Implementation (Fall 2004)

4 November 2004

Basic PHP

PHP is a bit like server-side includes on steroids. Like SSI, it's embedded in the HTML of a page, and is processed by the server before it sends the page to the browser. Unlike SSI, it is a fully-featured programming language, complete with database query capability.

PHP is most often used to create dynamic sites that pull content from a database. However, it can also be used for a variety of non-database operations--customizing the display of a page based on user input, for example, or sending email messages.

I've provided two PHP tutorial sites for you at http://del.icio.us/mamamusings/php/ .

Keep in mind that Grace is running PHP3, not PHP4. By default, it will only process PHP pages with a .php3 extension. If you'd like your PHP pages on Grace to have a .php extension, instead, you can create an .htaccess file with the following line:

AddType application/x-httpd-php3 .php