I've built some survey apps that set a cookie when the user submits the
form.  Then, if they try to submit again, it will not accept the submissi
on.
However, the cookies are set to die when the browser is closed, so if the
user comes back in, they can submit again.  You could set the cookie to l
ast
forever or some given amount of time if you wish.

Dave


----- Original Message -----
From: <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Wednesday, January 09, 2002 9:39 AM
Subject: Re: Is Their a Standard Way of Preventing Users from Entering
Double Records by Refreshing Browser?


Dave,

The project I am currently engaged in ran into this problem a couple of

months ago.  Due to the dynamic manner in which data is placed in the
database (since the project has gone through several teams), JavaScript
 was
used to catch "double-clicking" of submit buttons.  I will say, that wh
ile
this method is convenient, it is not the best.  I would definitely sugg
est
modifying the stored procedure to read before writing the data.  This w
ill
make life a great deal easier, especially if you are in a clustered
environment.

Just my thought on the matter,

Nick






                    PHP

                    <php@airbridg        To:     CF-Talk <cf-talk@house
offusion.com>
                    e.net>               cc:

                                         Subject:     Is Their a Standa
rd Way of Preventing Users from Entering
                    01/08/02             Double Records by Refreshing B
rowser?
                    07:56 PM

                    Please

                    respond to

                    cf-talk









Is Their a Standard Way of Preventing Users from Entering Double Record
s by
Refreshing Browser?

So when I submit A name and Email to a database and then hit refresh on
 the
page I was sent to Another entry appears

in the Database with the same information duplicated.  Is their a Commo
n
Practice in your coding to follow to prevent such a

small (yet potentially very common) Data Distortion.



Thanks,

Dave




______________________________________________________________________
Dedicated Windows 2000 Server
  PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER
  Instant Activation · $99/Month · Free Setup
  http://www.pennyhost.com/redirect.cfm?adcode=coldfusiona
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to