I have made a form which includes text fields and radio buttons.
The user completes the fields and makes their selections. Once the form is submit, they are then directed to a php file which displays their entries and selections.
Atm I can't quite work out how to post their radio button selections.
Here is the form:
<legend>Car type</legend>
<input name="cartype" type="radio" value="1" id="carone" />
<label for="carone">Compact</label><br />
<input name="cartype" type="radio" value="2" id="cartwo" />
<label for="cartwo">Saloon</label><br />
<input name="cartype" type="radio" value="3" id="carthree" />
<label for="carthree">SUV</label>
and here is my current code for the text fields:
<?php
$firstname = $_POST['firstname'];
$lastname = $_POST['lastname'];
$emailaddress = $_POST['emailaddress'];
$phone = $_POST['phone'];
echo "Dear ". $firstname . " " . $lastname . ",<br />";
echo "Thank you for your order. <br />";
echo "Your contact details are:- <br />";
echo "phone: " . $phone . "<br />";
echo "email: " . $emailaddress . "<br />";
?>
</body></html>
If anyone could give a hand I'd be very grateful!