QuickStart PHP: PHP Hypertext Preprocessing                         

by Matt Murphy and Dublas Portillo

Step-by-step instructions for learning to program with PHP

 About the language                                                    

Name:  PHP
Year created: 1994
Created by: Rasmus Lerdorf
Paradigm: Object Oriented and Procedural
Platform: Works on Unix, Mac OS X, and Microsoft Windows
Advantages: Very Efficient, Database Integration, Built-in Libraries, its free, Easy to Learn, Portable,
Disadvantages: Limited offline application functionality
Specification: http://www.php.net/manual/en/

Step 1: Downloading the required files

Step 2: Installing Apache2 Step 3: Installing the PHP files Step 4: Hello World Program Step 5: Title Creator.php

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Title Creator</title>
<style type="text/css">
body,td,th {
font-family: Arial, Helvetica, sans-serif;
$title = stripslashes($HTTP_POST_VARS["title"]);
$author = $HTTP_POST_VARS["author"];
$size = $HTTP_POST_VARS["size"];
$bgcolor = $HTTP_POST_VARS["bgcolor"];
$textcolor = $HTTP_POST_VARS["textcolor"];

if(isset($title) && isset($author) && isset($size) && isset($bgcolor) && isset($textcolor)) {
echo "<body bgcolor=$bgcolor text=$textcolor>";
echo "<center>";
echo "<$size>$title</$size>";
echo "<h5>$author</h5>";
echo "</center>";
echo "<p align=left></p>";
} else {
echo "<body>";
<table width="75%" border="1" bordercolor="#999999">
<td><form name="form1" method="post" action="testphp.php">
<p>Title of the page:
<input name="title" type="text" id="title" size="50">
<select name="size" id="size">
<option value="h1">Big</option>
<option value="h3">Medium</option>
<option value="h5">Small</option>
<input name="author" type="text" id="author" size="50">
<p>Background color:
<label> </label>
<input type="radio" name="bgcolor" value="red">
<input type="radio" name="bgcolor" value="blue">
<input type="radio" name="bgcolor" value="black">
<input type="radio" name="bgcolor" value="white">
<p>Text color: </p>
<input type="radio" name="textcolor" value="white">
<input type="radio" name="textcolor" value="#FFCC00">
<input type="radio" name="textcolor" value="black">
<input type="submit" name="Submit" value="Submit">
<input type="reset" name="Reset" value="Reset">


 Learning more                                                        

There is a vast amount of information available on the Internet.  Some of the best sources are:

 QuickStart Presentation                                           

Download and view the QuickStart PHP Powerpoint Presentation.

Back to QuickStart Languages