inzid
01-28-2012, 07:45 AM
Hi,
Im trying to link some radio buttons to a html form.
heres the code i got in the html showing the buttons..
Would you like a free phone consultation (15mins)
<br>
<label>
<input type="radio" name="cf_text9" id="YES" value="YES">
YES
</label>
<label>
<input type="radio" name="cf_text10" id="NO" value="NO" >
NO</label>
heres the php code;
$field_message = array($_POST["cf_text0"],$_POST["cf_text1"],$_POST["cf_text2"],$_POST["cf_text3"],$_POST["cf_text4"],$_POST["cf_text5"],$_POST["cf_text6"],$_POST["cf_text7"],$_POST["cf_text8"],$_POST["cf_text9"],$_POST["cf_text10"],$_POST["cf_text11"],$_POST["cf_text12"],$_POST["cf_text13"] );
$mail_to = 'xxxx';
$subject = 'Message from a site visitor '.$field_name;
$field_message="From: {$field_name}
E-mail: {$field_email}
Physical Address: {$field_message[0]}
Postal Address: {$field_message[1]}
Home Phone: {$field_message[2]}
Mobile: {$field_message[3]}
How soon would you like a reply?: {$field_message[4]}
Preferred Contact Method: {$field_message[5]}
Preferred Time of contact 1: {$field_message[7]}
Preferred Time of contact 2: {$field_message[8]}
Would you like a free phone consultation (YES): {$field_message[9]}
Would you like a free phone consultation (NO): {$field_message[10]}
as you can see i have created two different names for the radio button and the current code lets the user select the button and shows up yes or no correctly. but the problem i have is since the radio button name is different they can actually select both buttons..
i hope this makes sense im shocking at explaining things.
here is a link to the website
http://callumpirie.com/dev/form/generalemployee.html
any help would be great.
Im trying to link some radio buttons to a html form.
heres the code i got in the html showing the buttons..
Would you like a free phone consultation (15mins)
<br>
<label>
<input type="radio" name="cf_text9" id="YES" value="YES">
YES
</label>
<label>
<input type="radio" name="cf_text10" id="NO" value="NO" >
NO</label>
heres the php code;
$field_message = array($_POST["cf_text0"],$_POST["cf_text1"],$_POST["cf_text2"],$_POST["cf_text3"],$_POST["cf_text4"],$_POST["cf_text5"],$_POST["cf_text6"],$_POST["cf_text7"],$_POST["cf_text8"],$_POST["cf_text9"],$_POST["cf_text10"],$_POST["cf_text11"],$_POST["cf_text12"],$_POST["cf_text13"] );
$mail_to = 'xxxx';
$subject = 'Message from a site visitor '.$field_name;
$field_message="From: {$field_name}
E-mail: {$field_email}
Physical Address: {$field_message[0]}
Postal Address: {$field_message[1]}
Home Phone: {$field_message[2]}
Mobile: {$field_message[3]}
How soon would you like a reply?: {$field_message[4]}
Preferred Contact Method: {$field_message[5]}
Preferred Time of contact 1: {$field_message[7]}
Preferred Time of contact 2: {$field_message[8]}
Would you like a free phone consultation (YES): {$field_message[9]}
Would you like a free phone consultation (NO): {$field_message[10]}
as you can see i have created two different names for the radio button and the current code lets the user select the button and shows up yes or no correctly. but the problem i have is since the radio button name is different they can actually select both buttons..
i hope this makes sense im shocking at explaining things.
here is a link to the website
http://callumpirie.com/dev/form/generalemployee.html
any help would be great.