MS SQL Server 2012
Short version: A user submits a conference registration form, but realizes she made an error. She pages back in her web browser, enters corrected information, submits the form again, and gets an error -- "That email address is already in use."
Details: To prevent multiple registrations for the same email address, I use this code in the conference registration form:
<!--- in this query select NOTHING from table #request.RegisterTable#, and simply check if x_email exists --->
<cfquery datasource="#APPLICATION.dataSource#" name="CheckUserEmail">
SELECT 'Nothing' FROM #request.RegisterTable#
WHERE x_email = <CFQUERYPARAM CFSQLTYPE="cf_sql_varchar" VALUE="#form.x_email#">
AND RegisterID <> <cfqueryparam cfsqltype="cf_sql_integer" value="#val(form.RegisterID)#">
<!--- if x_email exists, display error; refuse record insert --->
<cfif CheckUserEmail.recordcount GT 0>
<cfthrow message="That email address is already in use. Did you already register for the NNVAWI conference? Please contact NNVAWI at email@example.com.">
This has worked fine until some users began to page back and make corrections. So, instead, I need to do the registration steps in this order:
1) get the user to review her entered information
2) give user a chance to go back and make corrections
3) commit the form data to the database
4) send the user to the payment gateway page
Is there a way that I can get the user to review her entered data before that data is committed to the database?
Thank you as always for your help.