View Single Post
Old 11-21-2012, 02:17 PM   PM User | #2
sunfighter
Senior Coder

 
Join Date: Jan 2011
Location: Missouri
Posts: 2,383
Thanks: 18
Thanked 350 Times in 349 Posts
sunfighter is on a distinguished road
Your form with radio buttons:
Code:
<form name="myForm" action="test.php" method="post">
<h4>Enter Max Number of Rooms.</h4>
<input type="radio" name="rooms" value="1" /> : 1 Room<br />
<input type="radio" name="rooms" value="2" /> : 2 Rooms<br />
<input type="submit" value="Submit">
</form>
Calls this php file "test.php":
PHP Code:
<?php
echo $_POST["rooms"];
?>
So if your form is correct [the one I showed you] your php is correct.
sunfighter is offline   Reply With Quote