Passing form variables from Login
i need help with the correct code. I would like to pass hidden form variables from login page to the success page.
I have tried using the prescribed procedure of passing hidden form variables from login page using session variables, namely:
Login page: <% Session("Session1") = Request("Fieldname") %>
success page:
- <% Session("Session1") = Request.Form("Fieldname") %>
- Bindings palette create session variable Session1 and insert into page: <%= Session("Session1") %>
This is not working. Can anyone offer their services to get this working asap.
Thanks
Comments
Info from Login
Because Dreamweaver Login, Insert, Update etc pages submit to themselves, you lose the ability to call on the form data, except by intercepting it in the case of Insert or Update just as the script starts.
In the case of Login, you can create a session from the information that is submitted in your form, for an example take a look at the actual login form, it uses the data from the form fields, and creates the Username Session, so you can easily to.
Find this code
' *** Validate request to log in to this site.
MM_LoginAction = Request.ServerVariables("URL")
If Request.QueryString<>"" Then MM_LoginAction = MM_LoginAction + "?" + Server.HTMLEncode(Request.QueryString)
MM_valUsername=CStr(Request.Form("UserName")) <-- this is creating MM_valUsername from the form field Username, which will be used to create the session MM_Username
Find this code
' username and password match - this is a valid user
Session("MM_Username") = MM_valUsername <-- this is creating the Session from the variable created above
You can add in your own code to produce your own sessions in the same way.
Then on the Successful login page, you can call on the Session you have created, and filter a recordset if you so chose to.
You must me logged in to write a comment.