|
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
|