Skip to main content
Participant
April 28, 2006
Question

Preventing duplicate form submission when page is loaded from history

  • April 28, 2006
  • 1 reply
  • 249 views
Hi

We have record insertion forms some of which insert unique records into sql databases and some which may not. Is there a way of stopping the user pulling the page from history (or using the back button) and then resubmitting the data?

I have put a trigger on the databases that basically updates existing data rather than re-inserting it if a duplicate is entered but as some of the record submissions are not unique this isn't always possible. I would also rather restrict the submission client side to reduce bandwidth and database calls.

I have tried various 'no caching' techniques on the page but none seem to work. Anyone have any bright ideas ... I am all out of ideas bright or not!!!

TIA
Karen
This topic has been closed for replies.

1 reply

Inspiring
May 2, 2006
Karen

I have used session variables to control this sort of thing. Basically the
insert/update statement tests for the existance of a variable with a
particular name. If no variable exists then this will indicate that the
request is coming from a history file, and it will not allow the process.
Equally as part of the insert process change the value in the variable and
do not allow and insert if the variable holds that value.


--
Paul Whitham
Certified Dreamweaver MX2004 Professional
Adobe Community Expert - Dreamweaver

Valleybiz Internet Design
www.valleybiz.net

"big_old_bird" <webforumsuser@macromedia.com> wrote in message
news:e2totv$ec9$1@forums.macromedia.com...
> Hi
>
> We have record insertion forms some of which insert unique records into
> sql
> databases and some which may not. Is there a way of stopping the user
> pulling
> the page from history (or using the back button) and then resubmitting the
> data?
>
> I have put a trigger on the databases that basically updates existing data
> rather than re-inserting it if a duplicate is entered but as some of the
> record
> submissions are not unique this isn't always possible. I would also
> rather
> restrict the submission client side to reduce bandwidth and database
> calls.
>
> I have tried various 'no caching' techniques on the page but none seem to
> work. Anyone have any bright ideas ... I am all out of ideas bright or
> not!!!
>
> TIA
> Karen
>