Heres the html form
<HTML>
<HEAD>
<TITLE>Wichita RC Raceway MemberShip</TITLE>
<script type="text/javascript">
function addVal(newVal, dest, addOrRemove) {
if (addOrRemove) { // true == add; false == remove;
if (dest.value.length != 0) {
dest.value= "";
}
dest.value += newVal;
} else {
dest.value.replace(new RegExp("[, ]?" + value, "ig"), "");
}
}
</script>
</HEAD>
<BODY>
<table border="0" cellspacing="0" width="100%">
<tr>
<td>
<p align="center"><b><font size="4">Wichita <font color="#FF0000">R/C
Raceway</font></font></b></td>
</tr>
</table>
<table border="0" cellspacing="0" width="100%">
<tr>
<td>
<p align="center"><b>Member Ship</b></td>
</tr>
</table>
<table border="0" cellspacing="0" width="100%">
<tr>
<td>
<p align="center"><b><font face="arial" size="2">Please Fill out <u>
Completely</u> </font></b><font face='arial' size=2><b> fields marked with a
<font color="#FF0000">*</font> are required:</td>
</tr>
</table>
<form enctype='multipart/form-data' action='membership.php' method='post'>
<table border=1 bordercolor='#000000'>
</table>
<div align="center">
<table width='100%' border=1 cellspacing="0">
<tr><td width="17%">First Name<font color='#ff0000'>*</font></td>
<td colspan="2">
<font face='arial' size=2><b>
<input type=text name='FirstName'></td>
<td colspan="7">
Last Name<font color='#ff0000'>*</font></td>
<td colspan="2">
<font face='arial' size=2><b>
<input type=text name='LastName'></td></tr>
<tr><td width="17%"> Date Of Birth<font color='#ff0000'>*</font></td>
<td colspan="2">
<font face='arial' size=2><b>
<input type=text name='DateOfBirth'></td>
<td colspan="7">
E Mail<font color="#FF0000">*</font></td>
<td colspan="2">
<font face='arial' size=2><b>
<input type=email name='EMail'></td></tr>
<tr><td width="17%"> Address<font color='#ff0000'>*</font></td>
<td colspan="2">
<font face='arial' size=2><b>
<input type=text name='Address'></td>
<td colspan="7">
Apt No</td>
<td colspan="2">
<font face='arial' size=2><b>
<input type=text name='AptNo'></td></tr>
<tr><td width="17%"> City<font color='#ff0000'>*</font></td>
<td colspan="2">
<font face='arial' size=2><b>
<input type=text name='City'></td>
<td colspan="7">
Phone No</td>
<td colspan="2">
<font face='arial' size=2><b>
<input type=text name='PhoneNo'></td></tr>
<tr><td width="17%"> State<font color='#ff0000'>*</font></td>
<td colspan="2">
<font face='arial' size=2><b>
<input type=text name='State'></td>
<td colspan="7">
Roar No</td>
<td colspan="2">
<font face='arial' size=2><b>
<input type=text name='RoarNo'></td></tr>
<tr><td width="17%"> Zip Code<font color='#ff0000'>*</font></td>
<td colspan="2">
<font face='arial' size=2><b>
<input type=text name='ZipCode'></td>
<td colspan="7" nowrap>
AMB Transponder No</td>
<td colspan="2">
<font face='arial' size=2><b>
<input type=text name='AMBTransponderNo'></td></tr>
<tr><td width="17%"> Adult Membership</td>
<td width="3%">
<font face='arial' size=2><b>
<input type="radio" value="$45.00" name="Membership"onclick="addVal(this.value, this.form.Amount, this.checked)" /><td colspan="4">
<p align="right">Junior Membership</td>
<td width="3%">
<font face='arial' size=2><b>
<input type="radio" value="$20" name="Membership"onclick="addVal(this.value, this.form.Amount, this.checked)" /><td colspan="4">
<p align="right">Family Membership</td>
<td width="3%">
<font face='arial' size=2><b><input type="radio" value="$60.00" name="Membership"onclick="addVal(this.value, this.form.Amount, this.checked)" /><tr><td colspan="12" style="font-size: 10pt"> <b>Adult Membership</b> 16 yrs and
older is $45.00. <b>Junior Membership</b> under 16 is $20.00.<br>
<b>Family Membership</b> is of immediate family members only, residing in
same house hold is $60.00<br>
Memberships are on a 12 month bases starting February 1st.<br>
Family memberships require information for those on membership (<i>see below</i>)</td>
</tr>
<tr><td width="17%"> Family Member 1</td>
<td colspan="3">
<font face='arial' size=2><b>
<input type=text name='FamilyMember1'></td>
<td colspan="5">
Family Member 2</td>
<td colspan="3">
<font face='arial' size=2><b>
<input type=text name='FamilyMember2'></td></tr>
<tr><td width="17%"> Family Member 3</td>
<td colspan="3">
<font face='arial' size=2><b>
<input type=text name='FamilyMember3'></td>
<td colspan="5">
Family Member 4</td>
<td colspan="3">
<font face='arial' size=2><b>
<input type=text name='FamilyMember4'></td></tr>
<tr><td width="17%" nowrap valign="top"> Assist With Track</td>
<td colspan="11" valign="top">
<font face='arial' size=2><b>
<input type=checkbox name='AssistWithTrack' value="YES">
</b></font>We do not require you to help with
the track, but it is greatly appreciated. We have seen tracks come and go due to
the lack of help. This is a non-profit facility and is made possible by
volunteers.</td></tr>
<tr><td width="17%" valign="top"> I agree<font color='#ff0000'>*</font></td>
<td colspan="11">
I<font face='arial' size=2><b> <input type=checkbox name='IAgree' value="YES"> </b></font>understand this membership is an annual
membership.</td></tr>
<tr><td width="17%"> Signature<font color='#ff0000'>*</font></td>
<td colspan="4">
<font face='arial' size=2><b>
<input type=text name='Signature'></td>
<td colspan="3">
<p align="right">Date<font color='#ff0000'>*</font></td>
<td colspan="4">
<font face='arial' size=2><b>
<input type=text name='DateSigned'></td></tr>
<tr><td colspan="12"> </td>
</tr>
<tr><td width="17%"> Total Amount</td>
<td colspan="11">
<font face='arial' size=2><b>
<input type=text name='Amount'></b></font> </td></tr>
</table>
</td></tr></table>
<input type='submit' value='Submit Form'> <input type=reset value='Clear Form'>
</BODY>
</HTML>
Heres the php file
<?php
include("global.inc.php");
$errors=0;
$error="The following errors occured while processing your form input.<ul>";
pt_register('POST','FirstName');
pt_register('POST','LastName');
pt_register('POST','DateOfBirth');
pt_register('POST','Address');
pt_register('POST','AptNo');
pt_register('POST','City');
pt_register('POST','State');
pt_register('POST','ZipCode');
pt_register('POST','PhoneNo');
pt_register('POST','EMail');
pt_register('POST','RoarNo');
pt_register('POST','AMBTransponderNo');
pt_register('POST','MemberShip');
pt_register('POST','FamilyMember1');
pt_register('POST','FamilyMember2');
pt_register('POST','FamilyMember3');
pt_register('POST','FamilyMember4');
pt_register('POST','AssistWithTrack');
pt_register('POST','IAgree');
pt_register('POST','Signature');
pt_register('POST','DateSigned');
pt_register('POST','Amount');
pt_register('POST','IPAddress');
pt_register('POST','DateSubmitted');
if($FirstName=="" || $LastName=="" || $DateOfBirth=="" || $Address=="" || $City=="" || $State=="" || $ZipCode=="" || $EMail=="" || $MemberShip=="" || $IAgree=="" || $Signature=="" || $DateSigned=="" || $Amount=="" ){
$errors=1;
$error.="<li>You did not enter one or more of the required fields. Please go back and try again.";
}
if(!eregi("^[a-z0-9]+([_\\.-][a-z0-9]+)*" ."@"."([a-z0-9]+([\.-][a-z0-9]+)*)+"."\\.[a-z]{2,}"."$",$EMail)){
$error.="<li>Invalid email address entered";
$errors=1;
}
$IPAddress = $HTTP_SERVER_VARS["REMOTE_ADDR"];
$DateSubmitted = date("l jS of F Y h:i:s A");
if($errors==1) echo $error;
else{
$where_form_is="http".($HTTP_SERVER_VARS["HTTPS"]=="on"?"s":"")."://".$SERVER_NAME.strrev(strstr(strrev($PHP_SELF),"/"));
$message="First Name: ".$FirstName."
Last Name: ".$LastName."
Date Of Birth: ".$DateOfBirth."
Address: ".$Address."
Apt No: ".$AptNo."
City: ".$City."
State: ".$State."
Zip Code: ".$ZipCode."
Phone No: ".$PhoneNo."
EMail: ".$EMail."
Roar No: ".$RoarNo."
AMB Transponder No: ".$AMBTransponderNo."
Member Ship: ".$MemberShip."
Family Member 1: ".$FamilyMember1."
Family Member 2: ".$FamilyMember2."
Family Member 3: ".$FamilyMember3."
Family Member 4: ".$FamilyMember4."
Assist With Track: ".$AssistWithTrack."
I Agree: ".$IAgree."
Signature: ".$Signature."
Date Signed: ".$DateSigned."
Amount: ".$Amount."
IP Address: ".$IPAddress."
Date Submitted: ".$DateSubmitted."
";
$message = stripslashes($message);
mail("mem@example.com","Member Ship Submitted",$message,"From: $FirstName $LastName");
$link = mysql_connect("localhost","mem","xxxx");
mysql_select_db("mem_formgn",$link);
$query="insert into Membership (First_Name,Last_Name,Date_Of_Birth,Address,Apt_No,City,State,Zip_Code,Phone_No,EMail,Roar_No,AMB_Transponder_No,Member_Ship,Family_Member_1,Family_Member_2,Family_Member_3,Family_Member_4,Assist_With_Track,I_Agree,Signature,Date_Signed,Amount,IP_Address,Date_Submitted) values ('".$FirstName."','".$LastName."','".$DateOfBirth."','".$Address."','".$AptNo."','".$City."','".$State."','".$ZipCode."','".$PhoneNo."','".$EMail."','".$RoarNo."','".$AMBTransponderNo."','".$MemberShip."','".$FamilyMember1."','".$FamilyMember2."','".$FamilyMember3."','".$FamilyMember4."','".$AssistWithTrack."','".$IAgree."','".$Signature."','".$DateSigned."','".$Amount."','".$IPAddress."','".$DateSubmitted."')";
mysql_query($query);
header("Refresh: 0;url=http://wichitarcraceway.com");
?><?php
}
?>