Suppose that you have a field called Name (FORM.Name in the action page)

<cfif IsDefined("Form.Name")>
  <cfquery>
    insert whatever into whatever values whatever
  </cfquery>

  <!--- the important one --->
  <cflocation addtoken="no"
url="#getFileFromPath(getBaseTemplatePath())#?More of your URLS, if you have
any">
</cfif>

<body>
   Thanks for submitting, blah blah blah
</body>

this is how it works
first time form comes, inserts, then redirects to itself again.  This time
no form goes
second time it is called the IsDefined is false and nothing gets inserted.
This is the form the user sees.  Does not matter how many times he refreshes
this form.  No DB will happen

<Jaime/>



-----Original Message-----
From: HappyToad.com [mailto:[EMAIL PROTECTED]]
Sent: Friday, September 29, 2000 9:08 AM
To: CF-Talk
Subject: Refresh Question?


How can I stop multiple records being added to the database when a user
clicks refresh on a form action page?

Rich

----------------------------------------------------------------------------
--
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or
send a message to [EMAIL PROTECTED] with 'unsubscribe' in
the body.

------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to