cheyner11 Posted March 1, 2006 Share Posted March 1, 2006 I am building a search engine for a site. A user can search by entering data in 10 different fields. Once a user gets results and clicks on a specific record (directed to record), how can I store this data so that I can let them click a link and go back to the search results?I am using sessions.The easiest way would be most appreciated.Thanks. Quote Link to comment Share on other sites More sharing options...
shocker-z Posted March 1, 2006 Share Posted March 1, 2006 just set a session variable called lastsearch that when a user searches for somthing it sets it.. Then on each page it has a link "original search" and has the prv search in a url e.g.[a href=\"http://www.myurl.com/search.php?search=$lastsearch\" target=\"_blank\"]http://www.myurl.com/search.php?search=$lastsearch[/a]and then on the search page before it validates all other searches just use if (isset($_GET['search'])) {//query and all that} else {//all other searchs from a POST}Is that a feisable idea?*justa ruff guess at what your wanting* Quote Link to comment Share on other sites More sharing options...
cheyner11 Posted March 1, 2006 Author Share Posted March 1, 2006 what would be contained in this search variable? Considering I have 10 possible fields..Thanks. 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.