From: Grant <grant@conprojan.com.au>
To: pgsql-php@postgresql.org
Subject: Re: User reloads inert script...
Date: Mon, 14 May 2001 10:35:19 +1000 (EST)
Message-ID: <Pine.LNX.4.21.0105141018270.8896-100000@webster.conprojan.com.au> (raw)
In-Reply-To: <000401c0d8e6$fe3d93e0$0200a8c0@server>
Well hopefully the error can easily be seen if it's a duplicate entry in
a table or something along those lines, and your IE will prompt you
before reposting form data. However, you can set a session variable that
identifies that the "process" you are performing has already been
completed. So after the insert is complete it will set the session
variable as 1, then if they press repost the variable exists and the
data will not be inserted again, and when the user clicks on the correct
menu to prompt to insert "new" data into the database, the variable will
be unset, so the insert can pass through, and then set again to stop
futher duplicate posts of the same data. Hope this helps.
On Thu, 10 May 2001, Christian Marschalek wrote:
> Hey there:)
>
> What would you do?
>
> Situation: you have a script doing some HTML formular data processing,
> some selects and inserts in a transaction and some html output.
>
> When the script is cancled on the client side. By normal PHP will cancel
> the script it self (which can be prevented). Now hopefully the
> transaction will be rolled back on PostgreSQLs side. Everything fine...
>
> But what If the user reloads the page? Then the whole process will be
> done twice... How would you prevent that?
>
> Tia! Chris
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org
>
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-php@postgresql.org
Cc: grant@conprojan.com.au
Subject: Re: User reloads inert script...
In-Reply-To: <Pine.LNX.4.21.0105141018270.8896-100000@webster.conprojan.com.au>
References: <000401c0d8e6$fe3d93e0$0200a8c0@server> <Pine.LNX.4.21.0105141018270.8896-100000@webster.conprojan.com.au>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox