PDA

View Full Version : PHP MYSQL database



newphp
07-03-2007, 04:48 PM
Hey everyone, i'm looking for a bit of help, i am new to MYSQL, and trying to figure something out, if it is possible at all.

I have a MYSQLADMIN database active with all of my criteria, i am trying to make it so that the users of my website can select radio buttons from a form, the value of those radio buttons will then force the MYSQL database to search for entries that fit into all of those categories.

Basically i want the value of the radio buttons selected to be entered into the
SELECT * FROM "table name" WHERE "table entry" = "VALUE of THE RADIO BUTTON"

Thanks in advance for your help everyone.

-jake

mburt
07-13-2007, 03:47 PM
Hmm... I'm not sure if it can be done client-side, but some server interaction has to take place.
A radio button can be read through a form with the method "post" like so:

$value = $_POST["radioname"];

jc_gmk
07-13-2007, 03:52 PM
all you need to do then is use the variable in the query

e.g.


$value = $_POST["radioname"];

$query = "SELECT * FROM tablename WHERE tableentry='$value'";