For most of my forms I used something like this for my SQL:

IF EXISTS(Select Username From USERS where username= '#form.username#')
     Update Stuff
ELSE
    Insert stuff

This way if the user does go back to correct something (so long as it
isn't the username). The form will update upon resubmit.

Adam H

On Wed, 28 Jul 2004 15:38:17 -0400, Tangorre, Michael
<[EMAIL PROTECTED]> wrote:
> Right after your initial insert set a session variable containing the some
> kind of ID to the record. Before you do another insert, check to see if the
> session var exists and if so, use an update query instead with the ID in the
> var...
>
> Mike
>
> > The problem I have run into in the past is that a user will
> > submit a form, then see the results (confirmation page) and
> > need to make a change, hit the back button, and end up
> > creating record #2 instead of updating the original record.
> >
> > So, in this case, how do you make the second pass on the form
> > actual perform an update operation instead of an insert?
>
>
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

Reply via email to