coolphpdude Posted March 12, 2008 Share Posted March 12, 2008 Hi, quick question for you... is it possible to search within a search result (refine an existing search). If i done an original search ($keyword as the searched word) e.g. $search = mysql_query("SELECT * FROM holidays WHERE holiday_hotel = $keyword") is it then possible on the next page to have another search box where the user could type in another keyword to search for? so for example, the user has searched for 'leazes hotel' and returned 30 results from various different countries around the world, could the user then search for 'france' as the location within that existing search result?? Thanks Quote Link to comment Share on other sites More sharing options...
unsider Posted March 12, 2008 Share Posted March 12, 2008 Yes. I'm pretty sure it's possible. Where you place your code is the trick. Quote Link to comment Share on other sites More sharing options...
coolphpdude Posted March 12, 2008 Author Share Posted March 12, 2008 what i actually want the user to do is go see the original results and then refine the results Quote Link to comment Share on other sites More sharing options...
coolphpdude Posted March 12, 2008 Author Share Posted March 12, 2008 Any idea how then? Quote Link to comment Share on other sites More sharing options...
coolphpdude Posted March 12, 2008 Author Share Posted March 12, 2008 can it be done or could someone point me in the right direction of something that could help me? Quote Link to comment Share on other sites More sharing options...
soycharliente Posted March 12, 2008 Share Posted March 12, 2008 Create a form that has hidden inputs for what they search the first time. All the user would see if a button that says refine search and all the previous values from the form would be submitted to a page. That page would just populate the search form again with what is posted. Quote Link to comment Share on other sites More sharing options...
coolphpdude Posted March 12, 2008 Author Share Posted March 12, 2008 ahh so carry forward the original search keyword and then take in the refined search as '$refine' then resubmit the search as select * from holidays where holiday_hotel = $keyword AND holiday_location = $refine?? Quote Link to comment Share on other sites More sharing options...
soycharliente Posted March 12, 2008 Share Posted March 12, 2008 If you want both variables to come into play, sounds like a plan to me. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.