How to redirect user back to their original search result

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Raj G

    How to redirect user back to their original search result

    Hello

    I have got a search function on database. People can search and once they got what they want they can edit the results to what they want but i want to do is when they finished editing i want user to get redirected to back to their original search result rather then them going search and searching all over it again and start from binging. i am sure its a very simple code but i am new to php.

    Help will be much appreciated.

    Kind Regards

    Raj
  • dlite922
    Recognized Expert Top Contributor
    • Dec 2007
    • 1586

    #2
    You have a couple of options:

    1. You can cache the page (store the results in some cache: browser cache, a file, template cache (e.g. with Smarty))

    2. Rerun the report with the given search criteria. This means of course you need to save the search criteria. You can save it in hidden form fields and submit it with the edits of the item, or store it in the session.

    Pick one, look into it, and let us know if any questions.


    Dan

    Comment

    • Abubakr
      New Member
      • Nov 2010
      • 3

      #3
      You can make the edit done in a new browser window using target="_blank" and pass the search criteria through the URL.

      By doing thisyou can leave the original search results intact.

      Comment

      • oranoos3000
        New Member
        • Jan 2009
        • 107

        #4
        hi

        you can add phrase that user inserted for content search and current address page as query string and repeat this for any page


        or you can apply session for this purpose for example
        $_SESSION['search'][] = information about current address page , phrase that user inserted for search and any information that you need after return this page

        and for return parent page you can get last member this array

        only while user ultimate search you must unset this array
        and free this resource for another use

        Comment

        Working...