Hi, I have a PHP code for a contact form that sends me an email, the basic version works but when I try to add a new field etc.. it doesn't email at all, please see code below.
This version works...
<FORM method=post action="sendmail.php">
Email: <br>
<INPUT name="email" type="text"><br>
Message:<br>
<TEXTAREA name="message"></textarea><br>
<input type=submit>
</FORM>
<?php
mail(
"example@example.com",
"This is the subject of the email",
"Message: " .$REQUEST[message]."\n",
"From: " .$REQUEST[email],
"-f".$_REQUEST[email]);
header( "Location: http://www.example.com" );
?>
Below are the subtle changes I have made to the code but it doesn't send at all, I have tried all sorts of changes....
<FORM method=post action="sendmail.php">
Email: <br>
<INPUT name="email" type="text"><br>
Name: <br>
<INPUT name="name" type="text"><br>
Message:<br>
<TEXTAREA name="message"></textarea><br>
<input type=submit>
</FORM>
<?php
mail(
"example@example.com",
"This is the subject of the email",
"Message: " .$REQUEST[message]."\n",
"Name: " .$REQUEST[name]."\n",
"From: " .$REQUEST[email],
"-f".$REQUEST[email]);
header( "Location: http://www.example.com" );
?>
Any help greatly appreciated.
Mark