We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 26401
    • 247 Posts

    I would like to add a link back in the search reasult
    is there a bult-in function for this that I don’t know about?

    otherwise I’m looking to extract
    ?searched=word1+word2 etc.. from the uri.

    I see there’s also a $_POST[’search’], but it looks like I can’t access it in the result

    any ideas?
      • 5811
      • 1,717 Posts
      I would like to add a link back in the search reasult
      is there a bult-in function for this that I don’t know about?
      No function provided with ajaxsearch for doing this kind of link

      otherwise I’m looking to extract
      ?searched=word1+word2 etc.. from the uri.

      I see there’s also a $_POST[’search’], but it looks like I can’t access it in the result
      Yes the search result page is provided by Post only.
      searched is used only to access to the document found
        • 26401
        • 247 Posts
        I was using the Google Analytics implementation, it has the javascript call that adds "AS_search"
        I’ve created a snippet to create a back link from the trimmed uri
        in case anyone cares to use it


        <?php
        $_segment = $_GET['searched'];
        if ($_segment != NULL){
        	return '<a href="[~44~]?AS_search=' .$_segment .'">Back to Search Results</a>';
        }
        ?>