i use this contact form php code, but when i try to send but it didt work, just tell me "No email address added. Please go back.", this is not my code, i just get it from other web, is anything wrong is this code? please help me if u can. thx
<?php
//variables (change these)
$youremail = "duodeathofgod@gmail.com";
// your email address
$subject = "Contact";
// the subject of the email
$thankyou = "thankyou.php";
// thank you page
// don't change anything else
if($email == ""){
?>
No email address added. Please go back.<br/>
<?php
}elseif($name == ""){
?>
No name added. Please go back.<br/>
<?php
}elseif($message == ""){
?>
No message added. Please go back.<br/>
<?php
}else{
$msg = ereg_replace("\\'", "'", $message);
$msg = ereg_replace('\\"', "\"", $msg);
$message1 = "from: $name\nemail: $email\nmessage:\n$msg1";
mail($youremail, $subject, $msg, "From: $email\r\nReply-to: $email\r\n");
?>
<meta http-equiv="refresh" content="0; url=<?echo $thankyou;?>"">
<?php
}
?>
<form action="mail.php" method="post">
Name <input type="text" name="name"><br/>
Email addess <input type="text" name="email"><br/>
Message<br/>
<textarea name="message" cols="40" rows="5"></textarea><br/>
<input type="submit" value="send"><br/>
</form>