Hello,
On my site, i have a form which people can fill in and it will then email it to my address, this is for a newsletter.
What i would like to do is after, they have clicked submit, it redirects them to another page. The code, i got off the internet, just takes them to a blankpage saying "Thanks for submitting your applicattion".
Could someone point me in the right way please?
Bellow is the code for you to see:
Index.html:
Mail.php:
The web address is:
http://www.HampshireDofEYouthForum.tk
Any feedback much wanted Good or bad
On my site, i have a form which people can fill in and it will then email it to my address, this is for a newsletter.
What i would like to do is after, they have clicked submit, it redirects them to another page. The code, i got off the internet, just takes them to a blankpage saying "Thanks for submitting your applicattion".
Could someone point me in the right way please?
Bellow is the code for you to see:
Index.html:
Code:
<form action="mail.php" method="post">
Your Name: <input type="text" name="name"></li>
<li>E-mail: <input type="text" name = "email"><br> </li>
<input type="submit" value="Submit">
</form>
Code:
<?
$name=$_POST['name'];
$email=$_POST['email'];
$to="JackDanielTracy@gmail.com";
$message="$name just filled in your News letter form.. Their e-mail address was: $email";
if(mail($to,"$name just subscirbed for your newsletter",$message,"From: $email\n")) {
echo "Thanks for your Applacation.";
} else {
echo "There was a problem sending the mail. Please check that you filled in the form correctly.";
}
?>
The web address is:
http://www.HampshireDofEYouthForum.tk
Any feedback much wanted Good or bad