columbo1977
Programmer
Can anyone help?
I have a newsletter signup on my site and it doesnt work please find the code below.
mail.php
<?php
$name=$_POST['name'];
$email=$_POST['email'];
$to="chiefscomputerclub@hotmail.com";
$message="$name just filled in your News letter form. Their e-mail address was: $email";
if(mail($to,"Applications From Your Site",$message,"From: $email\n")) {
echo "Thanks for your Application.";
} else {
echo "There was a problem sending the mail. Please check that you filled in the form correctly.";
}
?>
and the code that is in my site is :
<form action="../mail.php" method="post">
<div align="center">Your Name:
<input type="text" name="name">
<br>
E-mail:
<input type="text" name = "email">
<br>
<input type="submit" value="Submit">
</div>
</form>
The error message that I get when i submit it is below :
Warning: Unknown error in c:\webserver\phpdev5\ on line 6
There was a problem sending the mail. Please check that you filled in the form correctly.
Columbo1977
I have a newsletter signup on my site and it doesnt work please find the code below.
mail.php
<?php
$name=$_POST['name'];
$email=$_POST['email'];
$to="chiefscomputerclub@hotmail.com";
$message="$name just filled in your News letter form. Their e-mail address was: $email";
if(mail($to,"Applications From Your Site",$message,"From: $email\n")) {
echo "Thanks for your Application.";
} else {
echo "There was a problem sending the mail. Please check that you filled in the form correctly.";
}
?>
and the code that is in my site is :
<form action="../mail.php" method="post">
<div align="center">Your Name:
<input type="text" name="name">
<br>
E-mail:
<input type="text" name = "email">
<br>
<input type="submit" value="Submit">
</div>
</form>
The error message that I get when i submit it is below :
Warning: Unknown error in c:\webserver\phpdev5\ on line 6
There was a problem sending the mail. Please check that you filled in the form correctly.
Columbo1977