
Encoding - Decoding Variables
Hi Matt,
You could use the mid function to extract each character:
zz = request.querystring("ID")
id = mid(zz,2,1) & mid(zz,4,2) 'gets 1 chars starting with the 2nd
and 2 chars starting with 4th
In your example then id = "928"
HTH,
Dan
Quote:
> To avoid storing a variable in a Session object, I'd Like to encode a
user's
> ID so it can be attached to the URL and carried with them. Thing is I
want
> to bury it in a number or characters; such as -
> ../../detail.asp?ID=1982831 The User's ID is actually 923
> How do you write a VB Script snippet to pull those numbers out when the
> script calls for the user's ID?
> In case you are wondering why I don't just use the ID by it's self -
> Depending on the script they are going into, If the user changes the
number
> they may be able to view someone else's information. I'd rather them
cause
> an error and get sent back to GO (without collecting $200 : )
> Thanks for you help!
> Matt W.