Email Script - test radio buttons
Posted: Fri Sep 11, 2009 3:56 am
Hi,
I have the following code to send an email after a form submission:
This is working fine.
Ive added four radio buttons to the form :
Rad1, Rad2,Rad3,Rad4
and depending on which buttons are selected I need to send the response to two different emails eg,
if Rad1 or Rad2 is selected then send the email to email1@here.com
else
if Rad3 or Rad4 is selected then send the email to email2@here.com
Is this possible??
Many thanks for any help,
Fiorano
I have the following code to send an email after a form submission:
Code: Select all
<?
$destination="website@here.com";
$name=$_POST['name'];
$phone=$_POST['phone'];
$email=$_POST['email'];
$from = $_POST['email'];
$mes=$_POST['message'];
$header="From: $from\n";
$mes="Name: $name\n
Phone: $phone\n
Email: $email\n
Message: $mes\n";
mail($destination,"Web Enquiry",$mes,$header); header( "Location: http://www.here.com/thankyou.html" ); ?>
Ive added four radio buttons to the form :
Rad1, Rad2,Rad3,Rad4
and depending on which buttons are selected I need to send the response to two different emails eg,
if Rad1 or Rad2 is selected then send the email to email1@here.com
else
if Rad3 or Rad4 is selected then send the email to email2@here.com
Is this possible??
Many thanks for any help,
Fiorano