Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I create a session ID ...

Status
Not open for further replies.

DougP

MIS
Dec 13, 1999
5,985
US
How do I create a session ID to keep track of a user ordering items from my WEB site. I want to create my own shopping cart and then jump to the secure https credit card site.
Here is what I have so far got to the URL below
Click the Add to cart button

If you look at the customer number and invoice number it increments each time, which I don’t want to happen. I want to have multiple items show up on one order, not multiple orders created.
Its saving it to the database OK, but again it is creating a new order number for each instead of having multiple items on one order. as shown below

SessionID InvoiceNum CustomerID PartNum Description Qty Price Date Time
983220098 123920098 C39 Code 39 True Type Font 1 99.00 12/21/2001 11:57:55 AM
983220099 123920099 C39 Code 39 True Type Font 1 99.00 12/21/2001 12:27:32 PM
983220101 123920101 C39 Code 39 True Type Font 1 99.00 12/21/2001 2:19:16 PM
983220102 123920102 C39 Code 39 True Type Font 1 99.00 12/21/2001 2:20:50 PM
983220103 123920103 C39 Code 39 True Type Font 1 99.00 12/21/2001 2:22:56 PM
--------------------------------

TIA DougP, MCP

Visit my WEB site to see how Bar-codes can help you be more productive
 
To get the sessionID, then just ask for:

session.sessionID

You'll probabably want to instantiate an array of some sort in your Session_OnStart() in the global.asa of your project.

Sub Session_OnStart()
'dim some stuff here to keep track of your users
' and add to it as needed per your session.sessionID,
' which is how you will keep track of who is who
End Sub

Each time a user jumps into your application, a new sessionID will be attached to them, and whatever variables you declare there will be created. Careful not to use objects (recordsets, etc...) because as traffic increases, it can severely inhibit performance. I've never had any problems with simple variables (int, array(), etc...)

We have had some problems at work using sessions and IE6 because of its very complicated security settings. 5.0 & 5.5 never presented these problems, and we don't support NS so I dunno about that.

I swear it's a bug, though, because we went in and told it to accept all cookies (even though you should only have to accept sessions, which most ppl do) and still could not get it to work. So, basically, every time a user went from page to page, a new sessionID was being assigned and the old stuff was gone. Still are working on trying to figure out exactly the problematic setting, but you'll want to play around with it just to make sure you don't experience the same thing.

:)
paul
penny.gif
penny.gif
 
Missed the real question, did I?

IIS actually creates the ID for you. Your users' browser has to be set to accept session cookies, and then IIS does it automatically. Then refer to above post.

:)
penny.gif
penny.gif
 
I agree about IE 6 and bugs.
I had a problem with something else and Microsoft Techies told me to un-install IE6. It was a Beta version, but...

I found this on Session("Invoice")
which works OK
DougP, MCP

Visit my WEB site to see how Bar-codes can help you be more productive
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top