Welcome Guest, Not a member yet? Register   Sign In
search results
#1

[eluser]E303[/eluser]
I am creating a basic search application.

What i am having troubles with though is once someone clicks on a results and the information is displayed, I want to have a "back to results" link. How do I get display the page with the users results?
#2

[eluser]ejangi[/eluser]
You could have the search terms be passed via POST and as a URL segment. For instance:
Code:
http://mydomain.com/search/my+search+terms
And in your controller do something to the effect of:
Code:
$search_terms = '';
if (!($search_terms = $this->url->segment(2))) {
    $search_terms = $this->input->post('keywords');
}
// ... do actual search code here
That way you can simply grab the search terms again and create the "Back to results link".
#3

[eluser]mdavis1982[/eluser]
You could also keep previous page URLs in the session, and write out an anchor tag to point you back to the previous page.

Hope that helps!

Cheers...

Matt




Theme © iAndrew 2016 - Forum software by © MyBB