The-Last-Escape Posted April 29, 2007 Share Posted April 29, 2007 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...
bobleny Posted April 29, 2007 Share Posted April 29, 2007 $_SERVER['HTTP_REFERER'] It stores the last location they came from. <a href="<?php echo $_SERVER['HTTP_REFERER']; ?>">Back to results</a> I'm not sure if it will store the ?results=t12 aspect of the url though. Try it and see... Quote Link to comment Share on other sites More sharing options...
The-Last-Escape Posted April 29, 2007 Author Share Posted April 29, 2007 Ok I will thank you very much Quote Link to comment Share on other sites More sharing options...
AndyB Posted April 29, 2007 Share Posted April 29, 2007 <a href="javascript:history.go(-1)">go back works nicely</a> Quote Link to comment Share on other sites More sharing options...
bobleny Posted April 29, 2007 Share Posted April 29, 2007 <a href="javascript:history.go(-1)">go back works nicely</a> Provided that javascript is enabled in there javascript capable browser... Quote Link to comment Share on other sites More sharing options...
The-Last-Escape Posted April 30, 2007 Author Share Posted April 30, 2007 Thanks guys 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.