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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Setting and Retrieving Session ID's

Status
Not open for further replies.

fusionaire

Programmer
May 20, 2000
67
US
OK, I know this sounds silly, but how do I establish a unique session ID for every session that takes place?<br><br>I am building a simple shopping cart application, so none of the items placed in a cart will be inserted into the database until they choose to &quot;finalize&quot; the order.<br><br>I have client and session management enabled in my Application template, so I can acces the CFID and CFToken when I test on my machine, but my sessionID is the CFID and CFToken, which is fine for client side, but I cannot figure out how to establish a unique sessionID for every unique visitor who comes to the site.<br><br>Any tips would be much appreciated.
 
see the threads on the same topic from last week and two weeks ago.&nbsp;&nbsp;Basically, in the application.cfm page on the &lt;application name = whatever line include the following - <br>SESSIONMANAGEMENT = &quot;yes&quot;&gt;<br>then on the page that has the variable you want to save type<br>&lt;cfset session.variablename= whaqt you want it to be&gt;.<br>&nbsp;&nbsp;and always invoke session.variable when u callit.&nbsp;&nbsp;<br>just remeber that the variable only stays pit for that session- or in my limited experience- a whole day ( hat caused some problems when I needed to test new code but was stuck with defined variables) and if you want a variable to remain with a user for longer- client variables are need which are supposedly more complex.&nbsp;&nbsp;Also cookiesmight be needed which are also more involved.&nbsp;&nbsp;<br>hope this helps.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top