[math show=f]sidExpire=[GETCOOKIE name=sessionExpire][/math]
[showif [sidID]=]sidID is blank [Setcookie name=sessionID&value=[cart]&expires=[format days_to_date %A, %d-%b-%Y][math]{[date]}+7[/math][/format] [math time]{[time]}+{05:00:00}[/math] GMT&path=/&domain=.bear.net] [Setcookie name=sessionExpire&value=[math]{[date]}[/math].[format .5d][Math]{[time]}+[timeout][/Math][/format]&expires=[format days_to_date %A, %d-%b-%Y][math]{[date]}+7[/math][/format] [math time]{[time]}+{05:00:00}[/math] GMT&path=/&domain=.bear.net][/showif][showif [raw][sidExpire][/raw]=[sidExpire]] [Setcookie name=sessionID&value=[cart]&expires=[format days_to_date %A, %d-%b-%Y][math]{[date]}+7[/math][/format] [math time]{[time]}+{05:00:00}[/math] GMT&path=/&domain=.bear.net] [Setcookie name=sessionExpire&value=[math]{[date]}[/math].[format .5d][Math]{[time]}+[timeout][/Math][/format]&expires=[format days_to_date %A, %d-%b-%Y][math]{[date]}[/math][/format] [math time]{[time]}+{00:05:00}[/math] GMT&path=/&domain=.bear.net][/showif]
exp value [math show=t]exp=[math]{[date]}[/math].[format .5d][Math]{[time]}+[timeout][/Math][/format][/math] [math show=f]sidExpire=[GETCOOKIE name=sessionExpire][/math] [showif [sidID]=]sidID is blank [Setcookie name=sessionID&value=[cart]&expires=[format days_to_date %A, %d-%b-%Y][math]{[date]}+7[/math][/format] [math time]{[time]}+{05:00:00}[/math] GMT&path=/&domain=.bear.net] [Setcookie name=sessionExpire&value=[math]{[date]}[/math].[format .5d][math]{[time]}+[timeout][/Math][/format]&expires=[format days_to_date %A, %d-%b-%Y][math]{[date]}+7[/math][/format] [math time]{[time]}+{05:00:00}[/math] GMT&path=/&domain=.bear.net][/showif][showif [raw][sidExpire][/raw]=[sidExpire]] [Setcookie name=sessionID&value=[cart]&expires=[format days_to_date %A, %d-%b-%Y][math]{[date]}+7[/math][/format] [math time]{[time]}+{05:00:00}[/math] GMT&path=/&domain=.bear.net] [Setcookie name=sessionExpire&value=[math]{[date]}[/math].[format .5d][math]{[time]}+[timeout][/Math][/format]&expires=[format days_to_date %A, %d-%b-%Y][math]{[date]}[/math][/format] [math time]{[time]}+{00:05:00}[/math] GMT&path=/&domain=.bear.net][/showif] exp value [math show=t]exp=[math]{[date]}[/math].[format .5d][math]{[time]}+[timeout][/Math][/format][/math] DOWNLOAD WEBDNA NOW! The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...
[hideif [raw][sidExpire][/raw]=[sidExpire]] [Setcookie name=sessionExpire&value=[math]{[date]}[/math].[format .5d][Math]{[time]}+[timeout][/Math][/format]&expires=[format days_to_date %A, %d-%b-%Y][math]{[date]}[/math][/format] [math time]{[time]}+{00:05:00}[/math] GMT&path=/&domain=.bear.net][/hideif]--- end code ----------------------------------------------------------------This message is sent to you because you are subscribed to the mailing list
Hi,I am trying to build a cookie based session management system for my site. Basically I want to 'remember' the users and to time out their session after a given amount of time.Currently I have something which lets me set a sessionID cookie as well as a sessionExpire cookie. If the sessionExpire cookie doesn't exist then I create a new sessionID.Eventually I will also add the memberID and a couple other cookies for those users that are actually logged in. The current code would be added as an include at the top of each page of the site to track sessions.Using session cookies will let me report on user sessions with my log analyzing software as well.I do have a couple of questions that I hope someone can help on. Currently the only way I could get the expire time to seem to work in the [setcookie] was to use time math to add 5 hours, yet when I look at my cookies they have a proper expire time. I really don't know why that is working properly based on my code. I would like to expire the sessionID cookie as well this same way as it will change after it expires.To store additional info, would you suggest putting that in a sessions.db or just have more cookies? I am only thinking of a couple of things like memberID, possibly email address and their login info (encrypted of course).Thanks--- begin code ---[math show=f]timeout=60[/math] [math show=f]exp=[math]{[date]}[/math].[format .5d][math]{[time]}+[timeout][/Math][/format][/math] [math show=f]now=[math]{[date]}[/math].[format .5d][math]{[time]}[/Math][/format][/math] [math show=f]raw_dif=[math][format 5f][math][exp]-[now][/math][/format]*100000[/math][/math] ([raw_dif])
[text]sidID=[GETCOOKIE name=sessionID][/text]
[hideif [raw][sidExpire][/raw]=[sidExpire]] [Setcookie name=sessionExpire&value=[math]{[date]}[/math].[format .5d][math]{[time]}+[timeout][/Math][/format]&expires=[format days_to_date %A, %d-%b-%Y][math]{[date]}[/math][/format] [math time]{[time]}+{00:05:00}[/math] GMT&path=/&domain=.bear.net][/hideif]--- end code ----------------------------------------------------------------This message is sent to you because you are subscribed to the mailing list
Top Articles:
Talk List
Related Readings:
Emailer (1997)
Logging purchases (1997)
Not really WebCat (1997)
4.5's frequency of math problem running as demo? (2002)
Help!!!! Purchases not going through! (1997)
Security Levels... Possible? (2000)
Migrating to NT (1997)
&max= (2003)
taxRate and grandTotal calculation is not showing up on myThankYou.tpl (2000)
Server Load (2000)
Emailer problem with WC 2.1, NT, WebSite 2.1 (1998)
Formating found categories (1997)
[lookup] speed sales pitch (2003)
Calculating multiple shipping... (1997)
Upgrading old WebCat Database Files (1997)
WebStar Questions ... (2000)
raw field names (2001)
hideif [x]=1,2,3.. (2003)
WebCat2b14MacPlugIn - [include] doesn't hide the search string (1997)
RE: How to verify email address (1997)