Re: User reloads inert script...
От | Grant |
---|---|
Тема | Re: User reloads inert script... |
Дата | |
Msg-id | Pine.LNX.4.21.0105141018270.8896-100000@webster.conprojan.com.au обсуждение исходный текст |
Ответ на | User reloads inert script... ("Christian Marschalek" <cm@chello.at>) |
Список | 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@postgresql.org >
В списке pgsql-php по дате отправления: