Resubmit problem

jonathonball

[H]ard|Gawd
Joined
Sep 23, 2005
Messages
1,427
I keep all of the pictures that I post on this forum (or anything else I find funny) on my web site here.

I wrote a PHP script to serve up the pictures automatically..

Today I updated the script to serve up the pictures 10 at a time instead of having 150+ pictures all loading (un-thumb-nailed) on a single page.

I'm really happy with how the page works now, but I'm a little pissed that I get the following error after hitting the back button once I click into a picture

Confirm Form Resubmission

This web page requires data that you entered earlier in order to be properly displayed. You can send this data again, but by doing so you will repeat any action this page previously performed. Press Reload to resend that data and display this page.

does anyone know how I can design the page differently so I don't get this? Right now it's using PHP and HTML, and I'm changing pages using session variables and form submissions.
 
use method="GET" instead of POST for the form and set a hidden variable like page=# or something. or use regular html links like
<a href="<?=$_SERVER['PHP_SELF'] ?>?page=1">first page</a>
and within your php script check whether
$_REQUEST['page']
is set and a valid page number

using php sessions like you seem to be doing now makes it so you can't link to any particular page.
 
Back
Top