★ wanayoo — archive 1999 http://www.devshed.com/Talk/Forums/Forum5/HTML/000819.htmlNouvelle recherche | Portail wanayoo
DevShed Menu
* DevShed Home
* Developer News
* DevShed Brain Dump




UBBFriend: Email This Page to Someone!
  DevShed Discussion Forums
  PHP
  tracking the user using session variables

Post New Topic  Post A Reply
profile | register | preferences | faq | search

next newest topic | next oldest topic
Author Topic:   tracking the user using session variables
Shiju Rajan
Member
posted March 30, 2000 11:29 PM     Click Here to See the Profile for Shiju Rajan   Click Here to Email Shiju Rajan     Edit/Delete Message Reply w/Quote

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.


Thanks in advance

------------------
shiju

ecchu79
Junior Member
posted March 31, 2000 01:00 PM     Click Here to See the Profile for ecchu79   Click Here to Email ecchu79     Edit/Delete Message Reply w/Quote
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
posted April 01, 2000 02:10 AM     Click Here to See the Profile for Shiju Rajan   Click Here to Email Shiju Rajan     Edit/Delete Message Reply w/Quote
Hi,
Thank you for helping me.

Can you give me an example of session tracking?

amodi
Member
posted April 01, 2000 09:58 AM     Click Here to See the Profile for amodi   Click Here to Email amodi     Edit/Delete Message Reply w/Quote
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
posted April 01, 2000 01:18 PM     Click Here to See the Profile for Shiju Rajan   Click Here to Email Shiju Rajan     Edit/Delete Message Reply w/Quote
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
posted April 01, 2000 10:49 PM     Click Here to See the Profile for ecchu79   Click Here to Email ecchu79     Edit/Delete Message Reply w/Quote
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

Administrative Options: Close Topic | Archive/Move | Delete Topic
Post New Topic  Post A Reply
Hop to:

Contact Us | DevShed.com

Copyright © 1997-2000 ngenuity. All rights reserved.

Powered by: Ultimate Bulletin Board, Version 5.41a
© Infopop Corporation (formerly Madrona Park, Inc.), 1998 - 1999.