Re: User reloads inert script...

From: Grant <grant(at)conprojan(dot)com(dot)au>
To: pgsql-php(at)postgresql(dot)org
Subject: Re: User reloads inert script...
Date: 2001-05-14 00:35:19
Message-ID: Pine.LNX.4.21.0105141018270.8896-100000@webster.conprojan.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-php

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(at)postgresql(dot)org
>

In response to

Browse pgsql-php by date

  From Date Subject
Next Message Jack McKinney 2001-05-14 01:04:09 postgres.h missing?
Previous Message Roberto Mello 2001-05-11 14:52:41 Re: PHP calling PHP?