personally, i would move the processing to a seperate page but its doable on the same page
you can wrap the insert code like this <cfif isDefined("form.submit")> insert code goes here.... </cfif> or use StructKeyExists function ---------------------------------------- From: Discover Antartica <[EMAIL PROTECTED]> Sent: Wednesday, February 09, 2005 12:46 PM To: CF-Talk <cf-talk@houseoffusion.com> Subject: Refreshing the page gives problems The form in the page is submitting to the same page. If the user refreshes the page, then, the query to insert the record filled out in the form is executed again. So, the number of records in the table keep increasing. is there a way to prevent this? The primary key in the table the data is being inserted is a counter that increments itself. It is not part of the query that is inserting the new records. merci! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Find out how CFTicket can increase your company's customer support efficiency by 100% http://www.houseoffusion.com/banners/view.cfm?bannerid=49 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:193901 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54