PDA

View Full Version : PHP Help


mgrisme
04-27-02, 20:29
How can I make a search form for PHP, when i am trying to get info from a MySQL Database. SO i want to be able to search anything in the base. But i also want 2 pulldown menus that i can choose something from the MySQL Database. So in that case it will open up a page, for my info that will come up. PLease Help, THanks

KNSPAA
05-17-02, 08:38
Create your sql query string in code, based on users selection in form

SQL="SELECT * FROM MYTABLE WHERE " . $STRING ;

-Petri-

JeremyE
06-11-02, 13:25
I agree, and if you have two drop down menus corresponding with the database, use:

"SELECT * FROM blah WHERE field1 = $pulldownValue1 AND field2 = $pulldownValue2;"

Jeremy