|
I'm stumped trying to figure out how to add some radio button fields into a clients php/html form. not really my area of expertise and the form isn't quite how i would have made it but we're kind of stuck with it now.
Anyways here is how it is setup now:
The php part of the form submits info to his email using this format:
$mail_message= $mail_message . "Rental Choice: " . $typerental1. "\n";
$mail_message= $mail_message . "Rental Choice: " . $typerental2. "\n";
$mail_message= $mail_message . "Rental Choice: " . $typerental3. "\n";
$mail_message= $mail_message . "Rental Choice: " . $typerental4. "\n";
Right now it is only passing: "Rental Choice" to his email but need the user to be able to check one or all of 4 different radio buttons and have it pass whether the button is checked or unchecked using the above type of coding.
Here is the coding for the html part. I've been playing around with different ways to try and pass this info and the latest code included below with typerental 2 is my latest experiement at trying to figure out how to make it work but to no avail. Obvioulsy not know what I am doing, any help would be appreciated and would probably answer this forever and into the future lol.
<td align="right" valign="top" colspan="2">*Rental Choice: (Choose all that apply)</td>
<td align="left" valign="top" colspan="2"><input type="radio" name="typerental1" value="CellPhone" />Cell Phone
<input type="radio" name="typerental2" value="GPS" <?if ($typerental2 == "GPS") { ?> CHECKED <?}?>> GPS
<input type="radio" name="typerental3" value="blackberry" /> Blackberry
<input type="radio" name="typerental4" value="satphone" /> Satellite Phone
|