> Hello,
>
> I am sure this has been asked more then a few times but ... I have a web
> site where almost every page is dynamically
> created. So if at some point in the site if you hit your browsers back
> button a popup window occurs and asks if you want
> to resubmit the data. Upon clicking yes the page is properly displayed.
>
> That is a pain in the a$$ and I get many user complaints -- so far I have
> thought about saving the requested URL and
> query string in a session variable and loading a back button on every
> page.
>
> This seems to work create if the previous page can be loaded using a GET
> request but if the previous page was loaded
> using a HTTP POST it seems I an up the creek with out a paddle :(
>
> Any one have any ideas ...
>
> Thanks ..
>
> --
> Michael Gale
What I usually do is when requesting a new page, I check to see if there
are any $_POST data using the isset() function. If so, I assign all $_POST
data to $_SESSION vars at the top of the page. Once that's done, I do a
header redirect to the same page. That'll clear out all $_POST data and
you'll still have your vars sitting in $_SESSION.
Web page is index.php:
<?php
sesson_start;
if (isset($_POST["var"])) {
$_SESSION["var"] = $_POST["var"];
header("Location: index.php");
}
?>
...webpage stuff here...
--
--Matthew Sims
--<http://killermookie.org>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php