HTML Forms

Forms Template Demo

The HTML form below is part of our form template zip kit. Take it for a test drive then download the zip file if you want to examine it further.

HTML Form Template Kit

The form template kit includes extra background images for changing the color of the header. It includes the HTML form and 2 scripts for processing the data. The first script allows the user to make adjustments to the data entered. It also verifies for empty or incorrect field data entries. The second script saves the data in a file and returns a thank you message to the user. A mini tutorial for making modifications is also included. We recommend the use of a localhost server for testing on your PC.
Download Form_Template_ Kit.zip

HTML Forms and CGI

HTML forms are used in the development of interactive website design. Information is entered in text boxes. The Submit button (Next) is pressed and a CGI script processes the data.

Forms can be built using HTML , PERL and now PHP. At the present time most CGI scripts are written in PHP. Once the script is built it can be uploaded to your web space for testing.

A better way to test forms and CGI scripts is to set up a localhost server on your PC. The most popular server for this task is the Apache Server. If CGI scripts are written in Perl or PHP, they must also be installed and coordinated with the localhost server.



 Name
 First:  Last: 

 Address
 Street:   City: 
 
 Zipcode:  Select State:
 (5 digits)

 Home Phone:  Work Phone: 
 (Numbers only no dashes)
 

How easy is PHP?

Let's say you aren't worried about saving the information you collected from your personal information form in a file or database.

The simple script below would collect the data entered into the form, email it to you and then print a message on the screen with a link to a designated location.

<?php
$msg = "First Name: $firstname Last Name: $lastname Street: $street City: $city State: $state Zip: $zip Work Ph: $wphone Home Ph: $hphone\n\n";
$recipient = "email address you are sending to";
$subject = "Personal Information Form";
$mailheaders = "From: one of your existing pop email adresses\n \n";
mail($recipient, $subject, $msg, $mailheaders);
PRINT "Thanks for trying our resources. <a href=personal-information-form.html>Return to form.</a>";
?>

To use this script change the strings in the first line to match those on your input form.

Plug in your email adresses

Save the script with a php extension.

Upload the form and script to your server and set file permissions to 755(CHMOD).

Note: PHP scripts are not placed in your cgi-bin folder. Place them in the same folder as your forms.