This is a forum where members new and old can come to ask questions and get info and opinions. It is not a place to advertise your business or have other forms of advertising, whether it be in your posts or signature.

All links in the forum will not be indexed by Search Engines and any unapproved forms of advertising or spam will be dealt with accordingly, deleted, and that member's account banned.

Forums

Overview » Dreamweaver » Cookies instead of session variables!
Reply

Cookies instead of session variables!

LiToZ LiToZ
Freaking Member



Since: 24 Dec 2001
Posts: 65
Posted 21 May 2002 03:53:37

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 ?

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 ?
Viktor Farcic
Zone Manager



Since: 03 Apr 2001
Posts: 607
Replied 21 May 2002 09:20:49
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
LiToZ LiToZ
Freaking Member



Since: 24 Dec 2001
Posts: 65
Replied 21 May 2002 20:13:17
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?
Bobby Jenkins
Locked
Member



Since: 31 Aug 2001
Posts: 26
Replied 18 Jun 2002 18:52:55
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

Message
Reply
Follow us on Facebook Follow us on twitter Subscribe to the RSS feed
Activate your free membership today | Login | Currency