im having problems with the mail() function
here is the code that im using:
Code:
<html>
<body>
<table border="0" width=60% align="center">
<tr>
<td>
<form method="POST" action="mail.php">
Subject: <input type="text" name="subject">
Your Email: <input type="text" name="email">
Content:
<textarea rows=20 cols=50 name="content">
</textarea>
<input type="submit" value="Send mail">
</form>
</td>
</tr>
</table>
</body>
</html>
Code:
<html>
<body>
<?php
$subject=$_POST["subject"];
$email=$_POST["email"];
$content=$_POST["content"];
$message="From: ".$email."\r\n".$content;
if(mail("[email protected]", $subject, $message)===FALSE)
echo "Mail failed.";
else
echo "Mail succeeded.";
?>
</body>
</html>
when i push the 'Send email' button, nothing happens. The page doesnt load, and i dont get an email.
what is wrong?
Bookmarks