Home › Forums › Back End › Need help with a PHP search form… › Re: Need help with a PHP search form…
Probably the simplest way to handle this would be to have the page display no entries by default. User would input a zip code, press a button to submit the form, and the page would be reloaded with the results of the search.
Sounds like the PHP to perform that search shouldn’t be all that complicated. As you say, just search your database for all entries that match the zip code (which you could get by using $_GET or $_POST), and display them. Remember to validate the data that the user enters — make sure it is numeric and is the correct # of characters long to avoid errors.
This might get you started: http://www.tizag.com/mysqlTutorial/mysqlwhere.php