| ★ wanayoo — archive 1999 http://www.devshed.com/Talk/Forums/Forum5/HTML/000819.html | Nouvelle recherche | Portail wanayoo |
|
|
DevShed Discussion Forums
![]() PHP
![]() tracking the user using session variables
|
| next newest topic | next oldest topic |
| Author | Topic: tracking the user using session variables |
|
Shiju Rajan Member |
hi, can you tell me ,how to set session variables and how to retrive it in subsequent pages? i want to set username and password session variables from login page for tracking the user in my site.
------------------ |
|
ecchu79 Junior Member |
There are two ways that you could do it. One is store the session variable into a table, and then on each page at the very top, have a function that checks to see if the session is valid. Another way to do it is come up w/ ur own encryption scheme and then check if the encrypted session is valid. You'll have to pass the sessionID and whatever else you are going to check to each page. You can do this by passing the information in the URL |
|
Shiju Rajan Member |
Hi, Thank you for helping me. Can you give me an example of session tracking? |
|
amodi Member |
I have implemented session tracking in an application of mine which i am detailing below. hope u find it useful... i am using a combination of the username and the ip address of the user to generate a session variable from page to page. this string is encrypted using md5 this works fine without any problems... |
|
Shiju Rajan Member |
Hi amodi, i am not clear your explanation.can you show me a couple of lines of code. [This message has been edited by Shiju Rajan (edited April 01, 2000).] |
|
ecchu79 Junior Member |
You can check out an article that www.phpbuild.com has on session management. It'll probably have some code examples as well. [This message has been edited by ecchu79 (edited April 01, 2000).] [This message has been edited by ecchu79 (edited April 01, 2000).] |
All times are MST (US) | next newest topic | next oldest topic |
![]() |
|
Copyright © 1997-2000 ngenuity. All rights reserved.
Powered by: Ultimate Bulletin Board, Version 5.41a
© Infopop Corporation (formerly Madrona Park, Inc.), 1998 - 1999.