CodeIgniter Forums
Search function ja "Back to Search Results" -link - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21)
+--- Thread: Search function ja "Back to Search Results" -link (/showthread.php?tid=30877)



Search function ja "Back to Search Results" -link - El Forum - 05-28-2010

[eluser]Masoner[/eluser]
Hi,

So, this should be simple to solve, but i just cant get my head straight.

I have a search function in my page that searches papers and the url is like search/keyword_1/sample/keyword_2/paper. When results are shown and users clicks to paper info page, how can i pass the search url to paper info page for "Return to search results -link"? I have tried flashdata like $this->session->set_flashdata("search_url",current_url()), but it gets some carbage to the link (like /images/favicon.png).

Somebody had the same problem here, but i cannot find the thread anymone, his problem were solved when he changed his image paths to absolute.

But is there any other way to transfer search url to paper info page, without flashdata?


Search function ja "Back to Search Results" -link - El Forum - 05-30-2010

[eluser]pickupman[/eluser]
How about using the uri_string() function instead? Or just just a javascript link for [removed]go(-1);