benalex Posted June 13, 2007 Share Posted June 13, 2007 Hey Everyone! i just need a push in the right direction - whether that be a tutorial/website/script page etc I'm looking at re-designing a website and adding some php functionality to it. How would i go about creating a search like this page: http://www.stafforgserv.com.au/TeacherJobSearch.htm note: the current search doesn't work but thats the same kind of set-up that i'll be working on this can be done with one table right? thanks! Link to comment https://forums.phpfreaks.com/topic/55361-simple-search/ Share on other sites More sharing options...
genericnumber1 Posted June 13, 2007 Share Posted June 13, 2007 push Link to comment https://forums.phpfreaks.com/topic/55361-simple-search/#findComment-273636 Share on other sites More sharing options...
smc Posted June 13, 2007 Share Posted June 13, 2007 Well that kind of table isn't so much a search as it is calling up data that specifically coorelates to it. Example: <?php //Lets say you're form POST variables are apples, oranges, and noodles connect_to_my_database(); $my_mysql = mysql_query( "SELECT * FROM myTable WHERE myAppleColumn = '$apples' AND myOrangeColumn = '$oranges' AND myPastaColumn = '$noodles'" ) or die( mysql_error() ); while( $row = mysql_fetch_array( $my_mysql ) ){ $myReturnedID = $row['myIDorKeyColumn']; //Alternatively you can add this if you want multiple results $myEchoVar .= $myReturnedID; } echo( $myEchoVar ); ?> Hope this is also a gentle push in the right direction, do check the google results above though Link to comment https://forums.phpfreaks.com/topic/55361-simple-search/#findComment-273673 Share on other sites More sharing options...
benalex Posted June 13, 2007 Author Share Posted June 13, 2007 thanks for the push smc Link to comment https://forums.phpfreaks.com/topic/55361-simple-search/#findComment-273677 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.