![]() |
Pass Value of Radio Buttons through SQL Query
Dear Everyone,
I am very new to both PHP and MySQL. I have a MySQL database that includes a field called "max_rooms" with the values 1 or 2 set for each row in the database it applies to. In my HTML document, I have a form containing a question named "max_rooms" with two choices that are radio buttons. My PHP and MySQL are connected properly; I just don't know what to write in the form results PHP document so that the values are passed correctly. I think it might be something like the following, but I'm not sure and anyway don't know what to do after that: $sqlquery = "SELECT * FROM hallonly"; $sqlquery .=" where max_rooms = $_POST['max_rooms']"; Thanks!! Chava |
Your form with radio buttons:
Code:
<form name="myForm" action="test.php" method="post">PHP Code:
|
Dear sunfighter,
Thanks much; I finally figured it out. Chava |
| All times are GMT +1. The time now is 04:28 AM. |
Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.