Forums

This topic is locked

cookie monster.

Posted 17 Sep 2002 17:43:33
1
has voted
17 Sep 2002 17:43:33 Chris Mr. posted:
Assuming user has already setup an account, how do I setup cookies so that they are recognized throughout the site.

Next, how can I have the SHOW REGION display the sign in/new user form if their is no cookie found on their machine. If the cookie is found, the I want the SHOW REGION to display show the Welcome Username to show.

Thanks for the help.

.GrillCheese

Replies

Replied 18 Sep 2002 11:09:48
18 Sep 2002 11:09:48 Vince Baker replied:
A cookie will be available throughout your site once it is created. You can call on it from any page.

To show your welcome note:


<% Dim strUser
strUser = Request.Cookies("Your_Cookie_Name"
%>

<% If strUser <> "" Then %>

Welcome <%=strUser%>

<% End If %>

Regards
Vince

Response.write("The best line of code you can ever use"

VBScript | ASP | HTML | SQL | Oracle | Hosting
Replied 18 Sep 2002 17:57:31
18 Sep 2002 17:57:31 Chris Mr. replied:
One other question...based on what you said above:

If I have a "sign in" image and an image for "sign out" how would I do the IF/Then statement?

<% If strUser <> "" Then "<img src="images/but_logout.gif" width="50" height="15">" Else
<img src="images/but_signin.gif" %>

<% End If %>


.GrillCheese

Reply to this topic