// redirect to success page // CHANGE THE URL BELOW TO YOUR "THANK YOU" PAGE if ($success){ print "<meta http-equiv=\"refresh\" content=\"0;URL=thankyou.html\">"; } else{ print "<meta http-equiv=\"refresh\" content=\"0;URL=error.html\">"; } ?>
<li class="why"> <label for="form_reason">I'm sending this because</label><span class="required"></span> <select id="form_reason" class="is_required" name="Reason"> <option>I'm interested in Design Services</option> <option>I want to Advertise on your site</option> </select></li>
i also validated the form using jquery, :) not the one supplied with the download and it works the validation and the general function of the form works well but its just the re direction of the page after the submit
I took a break form my routine coding and I pondered and pondered then it hit me.... Well one things for sure i placed the Send.php file in my script folder on the server so it was giving me an error for some strange reason.I think it was could not find thankyou.html in Script folder So I placed it into the public folder of my server and it eliminated the error. in addition to that I forgot to specify <form id="myform" method="post" action="Send.php" id="myform"> within my contact page html. It works great now.
A huge thank you to all the people who helped me I really appreciate it!!!
<?php
// CHANGE THE VARIABLES BELOW
$EmailFrom = "sample limited";
$EmailTo = "salmple@gmail.com";
$Subject = "Contact Form Submission";
$Name = Trim(stripslashes($_POST['Name']));
$Email = Trim(stripslashes($_POST['Email']));
$Number = Trim(stripslashes($_POST['Number']));
$Reason =Trim(stripslashes($_POST['Reason']));
$Comment = Trim(stripslashes($_POST['Comment']));
// prepare email body text
$Body = "";
$Body .= "Name: ";
$Body .= $Name;
$Body .= "\n";
$Body .= "Email: ";
$Body .= $Email;
$Body .= "\n";
$Body .= "Number: ";
$Body .= $Number;
$Body .= "\n";
$Body .= "Reason: ";
$Body .= $Reason;
$Body .= "\n";
$Body .= "Comment: ";
$Body .= $Comment;
$Body .= "\n";
// send email
$success = mail($EmailTo, $Subject, $Body, "From: $EmailFrom");
// redirect to success page
// CHANGE THE URL BELOW TO YOUR "THANK YOU" PAGE
if ($success){
print "<meta http-equiv=\"refresh\" content=\"0;URL=thankyou.html\">";
}
else{
print "<meta http-equiv=\"refresh\" content=\"0;URL=error.html\">";
}
?>
my html is:
<form id="myform">
<fieldset>
<ul class="form">
<li class="who"> <label for="form_name">Full Name</label><span class="required">Required</span>
<input id="form_name" class="is_required" name="Name" type="text" /></li>
<li class="email"> <label for="form_email">E-mail Address</label><span class="required">Required</span>
<input id="form_email" class="vemail" name="Email" type="text" /></li>
<li class="vphone"> <label for="form_number">Contact Number</label><span class="required">Required</span>
<input id="form_number" class="is_required" name="Number" type="text" /></li>
<li class="why"> <label for="form_reason">I'm sending this because</label><span class="required"></span>
<select id="form_reason" class="is_required" name="Reason">
<option>I'm interested in Design Services</option>
<option>I want to Advertise on your site</option> </select></li>
<li class="comments"> <label for="form_comment">Comments</label><span class="required">Required</span>
<textarea id="form_comment" class="is_required" name="Comment"></textarea></li>
<li class="submit"> <input id="send_contact" type="submit" value="Send" /></li>
</ul>
</fieldset>
</form>
i also validated the form using jquery, :) not the one supplied with the download and it works the validation and the general function of the form works well but its just the re direction of the page after the submit
sigh... help me please
print "<meta http-equiv=\"refresh\" content=\"0;URL=thankyou.html\">";
change the URL and maybe the content=\"0; to some other number, I gave my code a complete URL
A huge thank you to all the people who helped me I really appreciate it!!!