Forums

ASP

This topic is locked

Cookies issue

Posted 04 Mar 2002 18:19:06
1
has voted
04 Mar 2002 18:19:06 chin chee keong posted:
Hi,

I have question on asp cookies. How do we set our cookies in session based. Since brinkster does not allow the free member use the session, I need to set the login section using the cookies, but what I want is the cookies is only session-based, and once the session ends, the cookies is no more use, and the user need to login again.

===

I have the whole script in asp, named cookies.asp as follows:

-----
If (not (session("MM_UserAuthorization" = "") Then
Response.cookies ("UserAuthorization"=Session("MM_UserAuthorization"
Response.Cookies("MM_Username"=Session("MM_Username"
Response.cookies ("UserAuthorization".Expires= Now
Response.cookies ("MM_Username".Expires= Now
strAuthorization = Session("MM_UserAuthorization"
End if
If (Request.Cookies("UserAuthorization"="" Then
Response.redirect ("login.asp"
Response.End
Else
strAuthorization = request.cookies("UserAuthorization"
End If
-----

My question is:

Response.cookies("UserAuthorization".Expires= Now
Response.cookies ("MM_Username".Expires= Now

Are these cookies in session-based? Please test my script at: www25.brinkster.com/surfmark/login/login.asp

user: test1, password: 11111
user: test2, password: 11111


Thanks.


Edited by - ckchin on 04 Mar 2002 18:24:17

Reply to this topic