logo-dw

Go Back   Dreamweaver Club Forums > Hand Coders Forum > ASP
Register FAQ Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Display Modes
Old 08-19-2008, 03:16 PM   #1
rico1931
 
Join Date: Jun 2008
Location: Buffalo
Posts: 198
Default Logging in display

Hi there I was just wondering what would be the best way to write an if then statement that will display the link to log in when nothing is stored in the cookie 'Auth_email' and vice versa when there is something in the cookie.

Thanks for the help!

Code:
<div align="center"><span class="style1"><a href="/AUTH_LogIn.asp">Log In</a>
</span><br />
  
  <br />
  Welcome <%=cStr(Request.Cookies("Auth_Email"))%>
<br />
 Not you? <a href="/AUTH_LogOut.asp">Log Out</a><br />
  User's Current Level: <%=cStr(Request.Cookies("Auth_Level"))%><br />
  </div>
rico1931 is offline   Reply With Quote
Old 08-19-2008, 04:56 PM   #2
rico1931
 
Join Date: Jun 2008
Location: Buffalo
Posts: 198
Default

ok so i figured it half out

Code:
<div align="center">Welcome 
  <% If Request.Cookies("Auth_Email") <> "" Then
  %>
  <%=cStr(Request.Cookies("Auth_Email"))%>
  
 
  <br /> Not you? <a href="/AUTH_LogOut.asp">Log Out</a><br />
  User's Current Level: <%=cStr(Request.Cookies("Auth_Level"))%><br />
  <%
 End If
 %>
  <br />
  
  <span class="style1"><a href="/AUTH_LogIn.asp">Log In</a></span><br />
  
  
  
  </div>
now I just need to find a way so this
Code:
<span class="style1"><a href="/AUTH_LogIn.asp">Log In</a></span><br />
Will only show up if nothing is withing Request.Cookies ... any clue? I tried >< haha hoping it would work opposite but it didn't haha.

Thanks!
rico1931 is offline   Reply With Quote
Old 08-19-2008, 05:06 PM   #3
davidj
davidj's Avatar
 
Join Date: Sep 2005
Location: The Toon (newcastle upon Tyne)
Posts: 8,256
Default

im not an asp'er but is this not correct

Code:
 
<% 
 
If Request.Cookies("Auth_Email") = "" 
 
Then 
 
%>
 
 <span class="style1"><a href="/AUTH_LogIn.asp">Log In</a></span><br />
 
 <%

 End If

 %>
__________________
Would you like to learn PHP from me? Check out -> www.codezenith.co.uk
davidj is offline   Reply With Quote
Old 08-19-2008, 05:52 PM   #4
rico1931
 
Join Date: Jun 2008
Location: Buffalo
Posts: 198
Default

Quote:
Originally Posted by davidj View Post
im not an asp'er but is this not correct

Code:
 
<% 
 
If Request.Cookies("Auth_Email") = "" 
 
Then 
 
%>
 
 <span class="style1"><a href="/AUTH_LogIn.asp">Log In</a></span><br />
 
 <%

 End If

 %>
And again Davidj is the hero! haha thanks and for now on i'll post my asp questions in the asp portion of the forum! Thanks
rico1931 is offline   Reply With Quote
Old 08-19-2008, 07:44 PM   #5
davidj
davidj's Avatar
 
Join Date: Sep 2005
Location: The Toon (newcastle upon Tyne)
Posts: 8,256
Default

asp is evil

it fell out of the devils anus

not to be too negative though
__________________
Would you like to learn PHP from me? Check out -> www.codezenith.co.uk
davidj is offline   Reply With Quote
Old 08-19-2008, 07:46 PM   #6
rico1931
 
Join Date: Jun 2008
Location: Buffalo
Posts: 198
Default

hahaha.... i know i know.. next web project i'll tell them that we need to move to php promise!
rico1931 is offline   Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 03:42 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Copyright 2006 DreamweaverClub.com