Forum Moderators: coopster
I have a table with 5 fields and I would like users to be able to use a form to search all fields in the table and then display the results on the page to the user (ie. when a search returns a hit it displays the results of all linked fields). Also it would be advantageous to have a drop down menu that populates itself based on one of the table fields so users can select from the menu rather than searching.
I realise this is common and that I have complicated it more, but any help really would very much be appreciated.
>> a drop down menu that populates itself based on one of the table fields
are you always searching the same table? If so you can even hard code the colnames.
issuing the SHOW COLUMNS [dev.mysql.com] query will give you what you need as well
As far as querying based on user input and looping through the returned values and displaying them on screen, this should help
Basics of extracting data from MySQL using PHP [webmasterworld.com]