marcs910 Posted April 4, 2007 Share Posted April 4, 2007 Still a newb as I have dropped off the hp wagon for a couple of months. Here's my question. Im looking to do one of the more advanced searches where you have a form you can narrow the search by username, user type, date entered, etc. Everywhere I've looked all I can find is the basic searches. Can someone point me in the right direction or show me some code please. Thanks Link to comment https://forums.phpfreaks.com/topic/45552-advanced-search/ Share on other sites More sharing options...
Mutley Posted April 4, 2007 Share Posted April 4, 2007 On your search form you might have a drop down box with a list of: Username User Type Data When they select one and do the search, in your SQL query you just need to change the WHERE statement to the above, so Very rough idea: $search_type = $_POST['type']; // From the drop down box form $sql = "SELECT.......... WHERE $search_type = '%SEARCHKEYWORDS%'; Link to comment https://forums.phpfreaks.com/topic/45552-advanced-search/#findComment-221151 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.