I read a bit of it, but it's still giving me trouble. I have the following
short, test, PHP script:
Header("Cache-control: private, no-cache");
Header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); # Past date
Header("Pragma: no-cache");

$link = mysql_connect("localhost","root","password");
$R = mysql_db_query("database","SELECT uid FROM users LIMIT 200");
$N = mysql_num_rows($R);

Number of Users: <? print $N . " - $Step"; ?>
<INPUT TYPE='Hidden' NAME='Step' VALUE='<? print $Step+1; ?>'>
<INPUT TYPE='Submit'>
Now, I load that script up, which displays "Number of Users: " and a submit
button. I click on the submit button, and then again on the next page and I
basically see: "Number of Users: 200 - 3" and a submit button.

Now, keeping the browser window open in the background, I go and edit the
script, changing LIMIT 200 to LIMIT 100 so that it will return just 100
users. I save and then go back to my browser and click the Back button, but
now I get an IE message saying that it cannot automatically resubmit the
posted information. What I want is to have it re-query the database with
this new LIMIT 100 query and return "Number of Users: 100 - 2"

So at this point I have either the option of forcing the user to see the IE
page and have them reload it, which works, or by allowing caching to go on.
Any more thoughts?

- Jonathan

"Chris Boget" <[EMAIL PROTECTED]> wrote in message
> > How can I ensure that a specific page is never cached and ALWAYS gets
> > processed every time it is viewed? Sometimes a viewer can hit his/her
> > browser's Back button (such a hateful button), and get a cached version
> > a dynamic page. I want this page's PHP code to be executed even if the
> > visitor uses their Back button to get to the page. Any thoughts on how
> > do this?
> Check out the discussion on the following page:
> http://www.web-caching.com/forums/Forum1/HTML/000133.html
> Chris

PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to