Hi Geoff,
You need to have somewhere to submit the values to!At the moment your code is not sending them anywhere whe they are submitted (action="")
Wat I would do is have the e-mail sending routine ona separate .php page and then submit the form to that location.
(You could use a self-submitting form but that might get a little complicated and I've not tested approach myself)
So in your example:
Change the form submission line to:
<form name="form1" method="POST" action="send_email.php">
......
......
<input type="submit" name="Submit" value="Submit">
Then create the page for sending the e-mail:
send_email.php ---->
<?PHP
$to = "user@domain.com";
$subject = "Response to Request";
$body = "My Choice was $variable \n"
. "My Comments are: $comments";
$from = "user@domain.com";
....
....
// send email
// @ supresses the display of parse errors
if($mailsend = @mail($to,$subject,$body))
{
// type the name of the page to go to if successful here
include("thanks.php");
}
else
{
echo "<font color=\"#FF0000\" size=\"3\" face=\"Arial\"><b>";
echo "COULD NOT SEND E-MAIL";
echo "</font></b></font>";
// type the name of the page to go to if failed here
include("......");
}
Also note that where you have user@domain in your to and from field you will have to pass these variables in the form if you want to use them.
What I do is get the user to type their e-mail address into the form and then pass this variable to the send e-mail page.
Hope this helps?
Regards
?>