Print Page | Close Window

reading cookie values

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: Classic ASP Discussion
Forum Description: Discussion on Active Server Pages (Classic ASP).
URL: https://forums.webwiz.net/forum_posts.asp?TID=3517
Printed Date: 29 March 2026 at 5:01pm
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: reading cookie values
Posted By: triggerlock
Subject: reading cookie values
Date Posted: 13 June 2003 at 12:52pm

How do you seperate the UID in the cookie? I know this is a dumb question, but all I get is TriGgeRLoCkD297Z572B74C1G4
does anyone know how to seperate the username from the hashed password?

THE CODE:
<%
Dim strLoggedInUserCode  'Holds the user code of the user
' retrive the data and set it to a variable
strLoggedInUserCode = Request.Cookies("Forum") ("UID")

' post it
Response.Write (strLoggedInUserCode)
%>




Replies:
Posted By: the boss
Date Posted: 13 June 2003 at 1:10pm
why not store username in a different sub variable and password in a different sub variable of the same parent variable??


Posted By: michael
Date Posted: 13 June 2003 at 1:12pm
This is a GUID and is not being ~stripped~ it is used to see what account is associated with this GUID in the DB.

-------------
http://baumannphoto.com" rel="nofollow - Blog | http://mpgtracker.com" rel="nofollow - MPG Tracker


Posted By: triggerlock
Date Posted: 13 June 2003 at 1:22pm
so if I use this to call the database, the database will return the correct username, right?


Posted By: michael
Date Posted: 13 June 2003 at 8:32pm
Well maybe I did not explain good. You use the value from the cookie and search the database for the record that matches. As there always will be only one the record returned will contain the username you need

-------------
http://baumannphoto.com" rel="nofollow - Blog | http://mpgtracker.com" rel="nofollow - MPG Tracker


Posted By: pmormr
Date Posted: 13 June 2003 at 8:33pm
are you setting the cookies? if so then you can use a separate statement and separate out the values

-------------
Paul A Morgan

http://www.pmorganphoto.com/" rel="nofollow - http://www.pmorganphoto.com/


Posted By: triggerlock
Date Posted: 14 June 2003 at 10:25pm

I could just copy the code from the common.asp file, the code that it uses to call the database, right?

I am just reading the values, I dont need to set them at all. I just want to read them from the main page...




Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net