Page 1 of 1

Results.php page

Posted: Sat Apr 16, 2005 4:09 am
by Sonny1973
i'd like to know how you would structure the following query for multiple selectnames (which are all contained in the search form, via multiple drop down menus):

Code: Select all

$query = mysql_query("SELECT * FROM tablename WHERE selectname LIKE '%$search%' LIMIT 0, 50"
also, i'd like to get rid of the Search box in the search form. so in other words i don't want to reference a search value, '%$search%', at all. all of the possible options for each selectname will be contained in their respective drop-down menus.

also is it possible to generate a customized (by me, the webmaster) visitor search form for MySQL database, using phpAdmin? if not, what front-end user software would anyone recommend?

thanks for any help in advance.

Posted: Sat Apr 16, 2005 6:34 am
by feyd
use a switch flow control construct to help generate the query string. Do not use the values from the drop downs passed in (they can be manipulated). This will require you requerying the database for the data that filled the drop downs likely if the data contained within can changed..

phpMyAdmin is not something a user should be playing with. Build your own, more user friendly system. Don't let them give you queries to run.. build the query yourself in the code. These are mostly security issues..