Get ready for BLACK FRIDAY shopping starting in

Forums

This topic is locked

Cookies instead of session variables!

Posted 21 May 2002 03:53:37
1
has voted
21 May 2002 03:53:37 LiToZ LiToZ posted:
Well, i have made a login page with Ultradev, but it stores the login info as a session variable!! how can i change that and make the login information stored as a cookie ?

Replies

Replied 21 May 2002 09:20:49
21 May 2002 09:20:49 Viktor Farcic replied:
Find this code and change every SESSION to COOKIES.

Session("MM_Username" = MM_valUsername
If (MM_fldUserAuthorization <> "" Then
Session("MM_UserAuthorization" = CStr(MM_rsUser.Fields.Item(MM_fldUserAuthorization).Value)
Else
Session("MM_UserAuthorization" = ""
End If


<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>
Well, i have made a login page with Ultradev, but it stores the login info as a session variable!! how can i change that and make the login information stored as a cookie ?
<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>

Viktor Farcic

TalkZone Manager
Replied 21 May 2002 20:13:17
21 May 2002 20:13:17 LiToZ LiToZ replied:
i found the code and made it :
' username and password match - this is a valid user
Cookies("MM_Username" = MM_valUsername
If (MM_fldUserAuthorization &lt;&gt; "" Then
Cookies("MM_UserAuthorization" = CStr(MM_rsUser.Fields.Item(MM_fldUserAuthorization).Value)
Else
Cookies("MM_UserAuthorization" = ""
End If



But i got the following error:
Microsoft VBScript runtime error '800a000d'
Type mismatch: 'Cookies'
/AllLogin.asp, line 34


so what can i do ? and also can u advice me and tell me is the session variable better or the cookies?
Replied 18 Jun 2002 18:52:55
18 Jun 2002 18:52:55 Bobby Jenkins replied:
You will need to add the Response function in front of the word Cookies.

For example <pre id=code><font face=courier size=2 id=code>Response.Cookies("User"=MM_valUsername</font id=code></pre id=code>

That should work for you.

Bobby

I'm Beginning to See the Light

Reply to this topic