Just assign the $_POST[] vars to session vars:

in your form instead of using a search.php(for instance) file as the actiuon
use a redirect.php.

This redirect.php file just reads the $_POST['q'] (q is the query variable)
and assigns it to a session var, then it redirects to search.php.

in search.php you just read the session var and post the results. In this
way if the user hits the back button, he will be sent to search.php and the
session var is always available.


On 11/17/06, Pete <[EMAIL PROTECTED]> wrote:
>
>   In message <[EMAIL PROTECTED] <ejirq8%2B3pmq%40eGroups.com>>, Jim
> Byrne
> <[EMAIL PROTECTED] <jim%40glasgowwestend.co.uk>> writes
> >Hi,
> >
> >I've created a website search form for a client, i.e., a visitors
> >types a search term in, and the script produces a set of links to
> >pages on the site.
> >
> >The problem I'm having is that the client isn't happy because if they
> >click their browser back button - after choosing a page from search
> >results page - a dialog box appears saying the results have expired
> >from teh cache - and do they want to repost the data.
> >
> >It seems to me that that's just the way it works, i.e., if they want
> >to look at the results page again the $_POST data needs to be re-sent.
> >They seem to think it's some kind of bug. Are there any tricks to get
> >around this? I.e., if they click the back button can they go directly
> >back to teh search results page?
> >
> >Thanks.
> >Jim
>
> I am pretty sure that I used to have that on my sites (PHP, MySQL) when
> using IE. But I can't remember what I did. What is the exact message?
>
> Try
> header("Cache-control: private");
> which goes before doctype...
>
> --
> Pete Clark
>
> Sunny Andalucia
> http://www.hotcosta.com/comm_1.htm
>  
>


[Non-text portions of this message have been removed]

Reply via email to