Forums
This topic is locked
Auto loggin - Please Help
Posted 11 Feb 2003 08:37:46
1
has voted
11 Feb 2003 08:37:46 Sven Hentschel posted:
I have completed the advanced cookie login tutorial found here: www.udnewbie.com/AdvancedTutorials/ckLogin/index.cfm
and was moving on to the auto login tutorial found here
www.udnewbie.com/AdvancedTutorials/AutoLogin/index.cfm
when I realised that the auto login tutorial used the default scripts from DWmx.
Is there an easy way to make an auto login that is tied in with the adv cookie tutorial ?
"snipet of code from advanced cookie"
If login__strhandle <> "xyz" AND NOT login.EOF then
Session("svMemberID"


Response.Cookies("ckLoggedin"

Response.Redirect "www.mydomain/html/member/home/index.asp"
else
Response.Redirect "www.mydomain/html/guest/home/login_error.asp"
End if
Could I place an if statment in there saying that if auto box "autologgin" is checked then make the expire date of ckLoggedin to 200000000 (some huge number so it is almost there forever or is there a way to make a cookie permanent?) and then on the home page and have a code looks like:
If Request.Cookies("ckLoggedin"

Response.Redirect "www.mydomain/html/member/home/index.asp"
End if
Would this check for the cookie and if it’s there it would it redirect to the members area, is this right ?