[thelist] (no subject)

Jon Steele jsteele at globalmss.com
Sat Aug 24 00:44:01 CDT 2002


One way would be to have a redirect on an action page (the page which is
posted to) to a display page (a page that simple shows info, doesn't need
post info)

//DO ACTIONS WITH DATABASE
$query = mysql_query($whatever_sql);

//REDIRECT TO A SIMPLE DISPLAY PAGE
echo "<script
language=\"JavaScript\">location='displayCalendar.php'</script>";

That way the user is never stationed on a page which uses POST info.

To ensure that data is not entered twice, you could generate a unique id in
the form posting the data (as a hidden field), and ensure that a query does
not use an id already used, since refreshing a POSTDATA page will use the
same unique id.

Jon

> -----Original Message-----
> From: thelist-admin at lists.evolt.org
> [mailto:thelist-admin at lists.evolt.org]On Behalf Of Andrew Embler (ML)
> Sent: August 23, 2002 7:55 PM
> To: thelist at lists.evolt.org
> Subject: [thelist] (no subject)
>
>
>
>
> Hello all,
> I'm creaing a web-app in PHP. Let's say its a Calendar. This is
> the problem
> I'm having, and what makes it worse is that it's the way that the browser
> is supposed to behave, but at this point I wish it weren't:
>
> * User adds an item to his/her calendar, (through a form, clicks "Save",
> form submits, etc...)
> * User then sees the Calendar view, w/new item present.
> * User clicks on another navigation link (e.g.: User heads to the
> "Projects" page.)
> * User tries to use the back button on his/her browser, but then gets the
> following warning:
>
> Internet Explorer: "The page cannot be refreshed without re-sending the
> information." Or worse: simply a blank page loads with the words "Page has
> Expired"
>
> Mozilla: "The page you're trying to view contains POSTDATA."
>
> IF the user hits Cancel, he/she gets nowhere. If the user hits "Retry/Ok"
> he/she adds another of the same items to the page - ie: the first query is
> re-posted to the page, resulting in an annoying duplicate.
>
> What I want to do is this: I want the initial form to post the additional
> information, the php script to process it, and then the page to reload.
> However, at that point, I want the page to think it hasn't been generated
> by a post. Any way to do this?
>
> Andrew
>
> --
> For unsubscribe and other options, including
> the Tip Harvester and archive of thelist go to:
> http://lists.evolt.org Workers of the Web, evolt !
>
>
>




More information about the thelist mailing list