I've trying to figure out the best option to create a search form with drop down menus for the search options. Does anyone know of a script that I can use to create a database with all of the categories that creates the interface for the search form as well? Or do I have to create a mysql db or flat file with all of the categories and create the PHP to do the search myself? Thanks!
You can do a file (flat or xml) or MySQL to populate the drop down list. As presumably you wont be changing the options that frequently it would be sensible to cache the results to save processing time each time the ddl is displayed.
I personally would go with the flat file option, and have the interface for adding new options (presumably some kind of admin panel) refresh the cache each time something is added to the table (the one flat file is based upon.) http://www.codewalkers.com/c/a/Database-Code/Populate-dropdown-box-with-MySQL-table-fields/ This is the basics of creating a drop down, and frankly unless you have a very trafic heavy site then the db soloution should be just dandy for you. Just remember to close mysql connections when you are done with them!
It would depend on if you need to enforce data integrity - with a db you can use a foreign key to ensure you dont cause issues with changes with a flat file you dont have the luxury so it depends on what the use is etc... for this case it certainly does seem that there wouldnt be a desire need for foreign keys etc