Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Radio Button Form

Status
Not open for further replies.

bccamp

Technical User
Jan 20, 2005
69
I've got a page with 4 radio buttons, that when "checked", I want passed to the second page and remain checked. I've got no problem with the code for the radio buttons, but I don't know how to 1) pass the info to the next page & 2) have the second page check for and display the checked radio button from the first page.

Code:
 echo "<form method=\"post\" action=\"$_server['PHP_SELF']\">";
echo "<input type=\"radio\" name=\"Button\" value=\"Value 1\"> Value 1";
echo "<input type=\"radio\" name=\"Button\" value=\"Value 2\"> Value 2";

How do I code to check for the button selected and input "checked" in the appropriate location?

Thanks for looking.
 
Check out a PHP form handling tutorial such as this one ( to get the basic idea. Then post back with any problems once you're a bit further down the line.

Clive
Runner_1Revised.gif

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
"To err is human, but to really foul things up you need a computer." (Paul Ehrlich)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To get the best answers from this forum see: faq102-5096
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top