Forum Moderators: open

Message Too Old, No Replies

Multi-page order/booking forms

How do they do it?

         

timchuma

2:51 am on May 26, 2004 (gmt 0)

10+ Year Member Top Contributors Of The Month



At the moment there is a multi-page booking form on my company's website that lets you go back to some pages, but not the first page as that is where the original order details are entered.

The information submitted after each form is stored in a database. This can be used to stop any duplicate records being created, but I haven't been able to work out how to check for such a thing on the first form as it could end up searching for the booking before it was created.

It has been suggested that I use session variables such as cookies, but I haven't had much luck with them (IE6 in particular seems to not like them, even on this site.)

I have been on other Ecommerce sites that let you go between forms to change order details, it is confusing me a lot that's all.

Thanks.

IanTurner

7:19 am on May 26, 2004 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



We use the Session.sessionID variable within ASP to identify the current visit.

timchuma

11:21 pm on May 26, 2004 (gmt 0)

10+ Year Member Top Contributors Of The Month



I thought the SessionID is a random value and can't be used as a unique identifier for records? (Two sessions could have the same SessionID)

Thanks.

Easy_Coder

12:32 am on May 27, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Session.sessionid is a unique identifier generated by the machine and is unique until a reboot occurs.

MS recommends not using the sessionid as a PK identifier in a database because if the machine is restarted the possibility exists that it could be duplicated.
[microsoft.com...]

timchuma

5:07 am on Jun 3, 2004 (gmt 0)

10+ Year Member Top Contributors Of The Month



I ended up creating a session variable based on the ID of the new booking record.

Then, if the person making the booking decided they wanted to change something on the previous form, they could go back and change it and when they click 'continue' it would go to the next screen without inserting a duplicate record.

Thanks.

timchuma

3:23 am on Jun 8, 2004 (gmt 0)

10+ Year Member Top Contributors Of The Month



As I found out later on, if you are using a session variable remember to have a Session.Abandon command when you no longer need to use the variable as it will persist until the person closes their browser.

In my case it led to them booking three times on the same BookingID (at least it worked.)

Thanks.