Code Example 1: week2form.html (Display a form)
LectureForm
Code Example 2: week2formproc.php (Process data from a form)
LectureFormProcessor
PHP Form Processing Example
Here is the output:
My name is
My email is
That is all
Code Example 3: List a database table
Product List
';
echo '
| Customer ID |
Customer Name |
';
while ($row = mysql_fetch_row($result))
{
$CustID = $row[0];
$CustName = $row[1];
echo '';
echo '| ' . $CustID . ' | ';
echo '' . $CustName . ' | ';
echo '
';
}
echo '
';
?>
db.inc file referenced in the include in the example above:
con1.php file referenced from db.inc above: