There's a couple of ways to handle that. One is to set a session variable or cookie at the time they reach the confirmation page. The idea being that your form template would check for the existence of that session variable or cookie and, if found, stop them from submitting the form.
Another way would be to put a timestamp on all your database records. Then, before inserting, check to see if an identical record was submitted within, say, the last half hour. This is more labor-intensive, but removes any issues with blocked cookies, proxy servers, browser caching, et. al. Obviously, if an identical record is allowed you'll need to account for that. To expand on this, you may present the user with a message that the record appears to already have been submitted and ask if they're sure they want to submit it again. There are other ways to handle it as well. (Stay tuned for the history.forward() trick.) > -----Original Message----- > From: Bob Haroche [mailto:[EMAIL PROTECTED]] > Sent: Monday, September 09, 2002 4:32 PM > To: CF-Talk > Subject: Preventing User from Re-submitting "Add Record" Form > > > I've a simple membership app which allows a user to add a new member > record. Once the record is added, the user is sent to a page > displaying the results of the data provided. If the user has inputted > incorrect data, this confirmation page has a link to update the newly > added record. That's all fine. > > But here's the problem: if the user instead uses the browser back > button, they're returned to the "Add New Record" page where they can > change the information previously provided. Once they re-submit that > form, of course, the original record is not updated but instead a > second, new record is created. > > How do I best prevent the user from re-submitting the "Add New Member" > form when what they really need to do is use the "Edit Member record" > form. > > A google search reveals the existence of a "Submit Once" CF custom > tag, which might help(?), but it's no longer available on the MM site. > > TIA. > > Regards, > Bob Haroche > O n P o i n t S o l u t i o n s > www.OnPointSolutions.com > > ______________________________________________________________________ Get the mailserver that powers this list at http://www.coolfusion.com FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/[email protected]/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

