suezyg23
asked on
Session Variables
I am building a Dynamic Web Site in Dreamweaver. I am trying to create a session variable that stays active as long as the person is on the site. My session variable is called MM_SiteID. Here is the code I have in my main page (this is the page that the user gets after they log in).
Session("MM_SiteID")="";
<%Session("MM_SiteID")= Request.QueryString("tSite ID").Item% >
I put this in the Form Tag. When I go to my next page the session variable does not carry over, it says undefined. But if I replace the Request.QueryString with just some hardcoded text such as "Hello", this will carry over to the next page. I am trying to pull a field from my form. I have a recordset called rsLogin. Once a user logs on, the record set is defined just to have their information in it (which it does) and what I am trying to do is pull the site ID out of this rs and put it in a session variable. Where am I going wrong?
Session("MM_SiteID")="";
<%Session("MM_SiteID")= Request.QueryString("tSite
I put this in the Form Tag. When I go to my next page the session variable does not carry over, it says undefined. But if I replace the Request.QueryString with just some hardcoded text such as "Hello", this will carry over to the next page. I am trying to pull a field from my form. I have a recordset called rsLogin. Once a user logs on, the record set is defined just to have their information in it (which it does) and what I am trying to do is pull the site ID out of this rs and put it in a session variable. Where am I going wrong?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
You need to Take Out .Item if its a Form Field, Like this..
Request.QueryString("tSite
And Also Make Sure the Form method is "GET" not Post.