PDA

View Full Version : passing form data - how?


tyguy85
06-03-2002, 02:21 PM
I can pass my form data (username and password) to one page by ( form action="login.asp"

but if i want to access say the username of the form again on a different page how do i retrieve it again?

How do i make that username field something i can retrieve with any of my .asp files.

This might be simple to some of you...let me know please!!!!

Anacrusis
06-05-2002, 06:49 PM
You have two options. you can store the username in a cookie, or you can store it in a session variable. I prefer a cookie so that way you can remember them the next time they visit. But if you want them to automaticly logout after a certain amount of inactivity time, use session variables.

Info for using Cookies: Click Here. (http://www.web-savant.com/users/kathi/asp/samples/tut/Cookies_Made_simple.asp)

Info for using session variables: Click Here (http://www.w3schools.com/asp/asp_sessions.asp)

you would write the username into the cookie/variable in the login.asp page.

You sould create a logout.asp page and clear this information in there.

Hope this helps :)