- Aug 11, 2006
- 7,828
- 1,968
- AFL Club
- Collingwood
Hi awesome people, hoping like hell that a genius resides here and might be able to help me out with my .php script for a mail form / contact form that I am making - I have pretty much no background in all of this except for this Dreamweaver tutorial I DL'd and EPIC FAIL so far, only thing it's managing to do is land on the thankyou page after you press submit!
<3 for life if you can help me fix the script, the error is probably something really obvious!
If the last 24 hours have taught me anything, it's that tech support guys are the greatest people on the planet. period.
my form in the .htm document:
<form action="student.php" method="post" name="form2" id="form2" onSubmit="MM_validateForm('Fname','','R','Lname','','R','DOB','','R','Email','','RisEmail','Mobile','','NisNum');return document.MM_returnValue">
<input name="subject" type="hidden" id="subject" value="Student Database">
<input type="hidden" name="redirect" value="thankyou.htm" />
<label><ff>First Name<denote>*</denote></ff>
<br><input name="Fname" type="text" id="Fname" value="">
</label></p>
<p><label><ff>Last Name<denote>*</denote></ff><br>
<input name="Lname" type="text" id="Lname">
</label></p>
<p><label><ff>DOB <denote>*</denote></ff><br>
<input name="DOB" type="text" id="DOB" value="Day/Month/Year">
</label></p>
<p><label><ff>Gender</ff><br>
<select name="Gender" id="Gender">
<option value="female" selected>Female</option>
<option value="male">Male</option>
</select>
</label></p>
<p><img src="_images/separator.png" width="500" height="4"></p>
<p><label><ff>Email Address<denote>*</denote>
</ff><br><input name="Email" type="text" id="Email">
</label></p>
<p><label><ff>Mobile Number</ff><br>
<input type="text" name="Mobile" id="Mobile">
</label></p>
<p><label><ff>Additional Comments</ff><br>
<textarea name="Comments" id="Comments"></textarea>
</label>
</p>
<p><label>
<input name="Submit" type="submit" id="submit" onClick="MM_validateForm('Fname','','R','Lname','','R','DOB','','R','Email','','RisEmail');return document.MM_returnValue" value="Submit">
</label>
<label>
<input type="reset" name="reset" id="reset" value="Reset">
</label>
the student.php script:
<?php
$mailto = 'ABC@123.com.au' ;
$subject = "Student Database" ;
$Fname = $_REQUEST['Fname'] ;
$Lname = $_REQUEST['Lname'] ;
$DOB = $_REQUEST['DOB'] ;
$Gender = $_REQUEST['Gender'] ;
$Email = $_REQUEST['Email'] ;
$Mobile = $_REQUEST['Mobile'] ;
$Comments = $_REQUEST['Comments'] ;
mail($mailto, $subject, $Fname, $Lname, $DOB, $Gender, $Email, $Mobile, $Comments);
header( "Location: http://www.ABC.com.au/thankyou.htm" );
?>
<3 for life if you can help me fix the script, the error is probably something really obvious!
If the last 24 hours have taught me anything, it's that tech support guys are the greatest people on the planet. period.
my form in the .htm document:
<form action="student.php" method="post" name="form2" id="form2" onSubmit="MM_validateForm('Fname','','R','Lname','','R','DOB','','R','Email','','RisEmail','Mobile','','NisNum');return document.MM_returnValue">
<input name="subject" type="hidden" id="subject" value="Student Database">
<input type="hidden" name="redirect" value="thankyou.htm" />
<label><ff>First Name<denote>*</denote></ff>
<br><input name="Fname" type="text" id="Fname" value="">
</label></p>
<p><label><ff>Last Name<denote>*</denote></ff><br>
<input name="Lname" type="text" id="Lname">
</label></p>
<p><label><ff>DOB <denote>*</denote></ff><br>
<input name="DOB" type="text" id="DOB" value="Day/Month/Year">
</label></p>
<p><label><ff>Gender</ff><br>
<select name="Gender" id="Gender">
<option value="female" selected>Female</option>
<option value="male">Male</option>
</select>
</label></p>
<p><img src="_images/separator.png" width="500" height="4"></p>
<p><label><ff>Email Address<denote>*</denote>
</ff><br><input name="Email" type="text" id="Email">
</label></p>
<p><label><ff>Mobile Number</ff><br>
<input type="text" name="Mobile" id="Mobile">
</label></p>
<p><label><ff>Additional Comments</ff><br>
<textarea name="Comments" id="Comments"></textarea>
</label>
</p>
<p><label>
<input name="Submit" type="submit" id="submit" onClick="MM_validateForm('Fname','','R','Lname','','R','DOB','','R','Email','','RisEmail');return document.MM_returnValue" value="Submit">
</label>
<label>
<input type="reset" name="reset" id="reset" value="Reset">
</label>
the student.php script:
<?php
$mailto = 'ABC@123.com.au' ;
$subject = "Student Database" ;
$Fname = $_REQUEST['Fname'] ;
$Lname = $_REQUEST['Lname'] ;
$DOB = $_REQUEST['DOB'] ;
$Gender = $_REQUEST['Gender'] ;
$Email = $_REQUEST['Email'] ;
$Mobile = $_REQUEST['Mobile'] ;
$Comments = $_REQUEST['Comments'] ;
mail($mailto, $subject, $Fname, $Lname, $DOB, $Gender, $Email, $Mobile, $Comments);
header( "Location: http://www.ABC.com.au/thankyou.htm" );
?>