Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - reading cookie values
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

reading cookie values

 Post Reply Post Reply
Author
triggerlock View Drop Down
Newbie
Newbie


Joined: 07 May 2003
Status: Offline
Points: 13
Post Options Post Options   Thanks (0) Thanks(0)   Quote triggerlock Quote  Post ReplyReply Direct Link To This Post Topic: reading cookie values
    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)
%>



Edited by triggerlock
Back to Top
the boss View Drop Down
Senior Member
Senior Member
Avatar

Joined: 19 January 2003
Location: Saudi Arabia
Status: Offline
Points: 1727
Post Options Post Options   Thanks (0) Thanks(0)   Quote the boss Quote  Post ReplyReply Direct Link To This Post 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??
Back to Top
michael View Drop Down
Senior Member
Senior Member
Avatar

Joined: 08 April 2002
Location: United States
Status: Offline
Points: 4670
Post Options Post Options   Thanks (0) Thanks(0)   Quote michael Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
triggerlock View Drop Down
Newbie
Newbie


Joined: 07 May 2003
Status: Offline
Points: 13
Post Options Post Options   Thanks (0) Thanks(0)   Quote triggerlock Quote  Post ReplyReply Direct Link To This Post Posted: 13 June 2003 at 1:22pm
so if I use this to call the database, the database will return the correct username, right?
Back to Top
michael View Drop Down
Senior Member
Senior Member
Avatar

Joined: 08 April 2002
Location: United States
Status: Offline
Points: 4670
Post Options Post Options   Thanks (0) Thanks(0)   Quote michael Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
pmormr View Drop Down
Senior Member
Senior Member


Joined: 06 January 2003
Location: United States
Status: Offline
Points: 1479
Post Options Post Options   Thanks (0) Thanks(0)   Quote pmormr Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
triggerlock View Drop Down
Newbie
Newbie


Joined: 07 May 2003
Status: Offline
Points: 13
Post Options Post Options   Thanks (0) Thanks(0)   Quote triggerlock Quote  Post ReplyReply Direct Link To This Post 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...

Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.