Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

session variables in VBScript??

Status
Not open for further replies.

JanS

Technical User
Feb 21, 2001
77
AU
Is it possible to reference a session variable through vbscript? I am storing the username entered by the user and would like to reference the session variable storing this information in a vbscript sub.

Is it possible? if so, how do i do it??

thanks in advance
jan
 
you can pull a session variable in simply by requesting it into the page receiving the session variable.

username = session("username")

Generally, it's a good idea to stay away from session variables if you can tho. If the user is submitting this from a form, you could use:

<input type=&quot;hidden&quot; name=&quot;username&quot; value=&quot;<%=request('namevar')%>&quot;>

where namevar is the name of the text box

or you could write a cookie to the user(s) pc and then retrieve the info from the cookie.

hth
mark
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top