Make your own free website on

Visit the Official PHP Website

Search this Site

PHP Programming

By James N Hitz

The Interface

Our HTML Interface will look as folows:

<html><head><title>Suggestion Box</title></head>
<body bgcolor="black" text="white">

<h2>Suggestion Box</h2>

<p>Please supply us with your details and comments
(Details marked <font color="red">*</font> are required.

<form action = "" method=POST>

<tr><td>First Name<font color="red">*</font>:</td>
<td><input name="fName" type="text" size="15"></td></tr>
<tr><td>Last Name:</td>
  <td><input name="lName" type="text" size="20"></td></tr>
<tr><td>Email Address:</td>
  <td><input name="eAddress" type="text" size="20"></td></tr>
<tr><td>Suggestions<font color="red">*</font>:</td>
  <td><textarea name="suggestion" cols="40" rows="5"></td></tr>
<tr><td> </td><td><input type="text" size="15">
<input type="submit" value="Ok"></td></tr>

This is plain HTML and there is nothing to explain here. The only portion worth a mention is the one in bold. This specifies the action as This is because my server (imaginary) is and my PHP script to process the HTML entries, is suggest.php, which resides in the directory php-bin.

It is also worth noting that there are two compulsory fields - the First Name and the suggestion.

Let's take a look at the script and see how it looks like...

<< A RegExp Example | The code >>

JamHitz Productions