How do I add radio buttons on php form?

gjay17

New member
I only took off the email address. When the form is filled out only a few things are sent to my email
Here's my scrip.
<?php
if ( isset ( $_POST [ 'buttonPressed' ])){
$to = email';
$subject = 'From PHP contact page' ;
$message = $_POST [ "message" ];
$headers = 'From: ' . $_POST [ "from" ] . PHP_EOL ;

mail ( $to , $subject , $message , $headers );
echo "Your information has been sent! You should receive a reply within 24 hours!" ;}
else {
?>
<form method= "post" action= " <?php echo $_SERVER [ 'PHP_SELF' ] ; ?> " />
<table>
<tr>
<td> Name: </td>
<td><input name= "from" type= "text" /></td>
</tr>
<tr>
<td> Phone: </td>
<td><input name= "from" type= "text" /></td>
</tr>
<tr>
<td> Email: </td>
<td><input name= "from" type= "text" /></td>
</tr>
<td> How many shirts would you like?: </td>
<td><input name= "from" type= "text" /></td>
</tr>
<td> Style: </td>
<td><p>
<label>
<input type="radio" name="RadioGroup2" value="Value" id="RadioGroup2_0" />
Value</label>
<br />
<label>
<input type="radio" name="RadioGroup2" value="Deluex" id="RadioGroup2_1" />
Deluex</label>
<br />
<label>
<input type="radio" name="RadioGroup2" value="Premium" id="RadioGroup2_2" />
Premium</label>
<br />
</p></td>
</tr>
<td> Color: </td>
<td><p>
<label>
<input type="radio" name="RadioGroup1" value="White" id="RadioGroup1_0" />
White</label>
<br />
<label>
<input type="radio" name="RadioGroup1" value="Light Color" id="RadioGroup1_1" />
Light Color</label>
<br />
<label>
<input type="radio" name="RadioGroup1" value="Dark Color" id="RadioGroup1_2" />
Dark Color</label>
<br />
</p></td>
</tr>
<td> How many colors are on the design?: </td>
<td><p>
<label>
<input type="radio" name="RadioGroup3" value="1" id="RadioGroup3_0" />
1</label>
<br />
<label>
<input type="radio" name="message" value="2" id="RadioGroup3_1" />
2</label>
<br />
<label>
<input type="radio" name="message" value="3" id="RadioGroup3_2" />
3</label>
<br />
<label>
<input type="radio" name="message" value="4 or more" id="RadioGroup3_3" />
4 or more</label>
<br />
</p></td>
</tr>
<tr>
<td> Your message: </td>
<td><textarea name= "message" cols= "20" rows= "6" ></textarea></td>
</tr>
<tr>
<td></td>
<td><input name= "buttonPressed" type= "submit" value= "Submit" /></td>
</tr>
</table>
</form>

<?php } ?>

</td>
</tr>
</table>
 
Back
Top