Forum Moderators: open

Message Too Old, No Replies

Multiple form pages

         

ggombar

2:31 pm on Jul 21, 2005 (gmt 0)

10+ Year Member



Hi

I have 6 different pages form1.asp, form2.asp, form3.asp and so on. Each one of them have one form having multiple fields. When I submit the form on form1.asp , it takes me to form2.asp where I use Request.form to collect the values and insert a record in one of my tables in database.

In form2.asp I have a form which also has lot of fields when submitted takes me to form3.asp and inserts a record in another table.

This whole process goes till all 6 forms are submitted and records are inserted in 6 dfferent tables. My problem is that if a user refreshes any page say form2.asp, it creates a duplicate record in table of the values entered in form1.asp. Plz suggest me the best way to avoid this issue.

Thanks

mrMister

2:55 pm on Jul 21, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Create a unique identifier on form 1 and check to see if data has been entered in to the database for that unique identifier. If it has, then don't execute the INSERT statement.