Injury .PHP Mail Form Script Help

Remove this Banner Ad

WakeUpPies

Norm Smith Medallist
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" );
?>
 
Spent the last 3 days fixing website issues - such a productive way to start the year ha
 

Log in to remove this ad.

..... MYSQL Database?

Ha looks like I am going to be working on fixing web issues for the rest of the week huh?
 
..... MYSQL Database?

Ha looks like I am going to be working on fixing web issues for the rest of the week huh?


Well if you are enjoying it then it won't be a Pain.

Where is the Info Going when you enter it in. That is why the MYSQL Database comes in so it gets Stored There
 
I've been storing the information in an excel file if that's what you mean?

Re: enjoyment it was fun over the last 12 month when I was setting everything up and it was all working :D! Upgraded my hosting and now nothing works and there goes the fun factor ha - at least there is a band-aid solution in place right now or else I'd be rolling on the floor sobbing!
 
ah ok have to set up smtp and everything (whatever that means) - ok

7686178464_fdc8ea66c7.jpg
 
I've been storing the information in an excel file if that's what you mean?

Re: enjoyment it was fun over the last 12 month when I was setting everything up and it was all working :D! Upgraded my hosting and now nothing works and there goes the fun factor ha - at least there is a band-aid solution in place right now or else I'd be rolling on the floor sobbing!


Did not know you could do it on Excel. Was only Shown it was done in MYSQL at Tafe
 

Remove this Banner Ad

Back
Top