One way is to add a hidden field which is a random number to the the form.
Add this to the database table as well when doing the insert. Your action
page should start with a check for the existance of the random number in the
db, if it exists then you have a resubmit going on and you just override it.
hth
Matt
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 17, 2001 8:25 AM
To: CF-Talk
Subject: duplicating inserts
Anyone know of a way to stop records from being reinserted into a
database when a user hits the back button? I have a page that checks
for duplications in a database, and if it finds no duplicate, then it
will insert it into the database. Problem is, when a user hits the back
button, it inserts the record again. Its not finding duplicates more
than likey because the query is being cached so it doesnt know to look
again. But how can I get it to either do nothing including not
inserting the record a second time or atleast recheck again to see if
its a duplicate record? I can't take caching off this machine as these
are some monster queries and performance is greatly improved by caching
queries.
Thanks
***********************************
Misty Woodward
ODS Decision Support
tel: 913.315.6583
email: [EMAIL PROTECTED]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists