Current location: Hot Scripts Forums » Programming Languages » PHP » The power of sessions?


The power of sessions?

Reply
  #1 (permalink)  
Old 01-26-04, 01:48 PM
perleo perleo is offline
Coding Addict
 
Join Date: Jul 2003
Location: Ireland
Posts: 269
Thanks: 0
Thanked 0 Times in 0 Posts
Post The power of sessions?

Okay,

I was looking through the database for a forum today and saw a session table and it had all the sessions used in it.

So whats the point in that? What can logging sessions do for me as a website administrator?
How can I log other info along with the info, eg. what user id used that session id, what time was it used, for what duration,

Is there anyway of logging what the person using a session id did during that session? e.g what pages they looked at?

Thanks
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #2 (permalink)  
Old 01-26-04, 02:14 PM
woyrz's Avatar
woyrz woyrz is offline
Newbie Coder
 
Join Date: Dec 2003
Location: montreal
Posts: 78
Thanks: 0
Thanked 0 Times in 0 Posts
I am not sure correctly

Using session id depend more the way you work. The point of it i cant tell you exactly.

but there is a way to get the session id

session_id() will give you the id of the user session.

you could create a table that looking like this

--------------------------------------------------
id | master_id | sessionid | login(date)|logout(date)|
--------------------------------------------------

afeter when you start the session juste add this isert
insert into session values('','','the_master_id', 'session_id(),'now()','')

a the log out do the same but add the where in you msql querry make sure you use the session_id to call the right line cuze some one could comme more thant once so the master id is not the right thing to reffer you could also look for the the table id

i hope is what you want
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #3 (permalink)  
Old 01-26-04, 03:26 PM
ermau's Avatar
ermau ermau is offline
Wannabe Coder
 
Join Date: Aug 2003
Location: Florida, USA
Posts: 240
Thanks: 0
Thanked 0 Times in 0 Posts
There are PHP methods to write you're own session handlers which would mean you could do essentially anything you wanted with the session information...
__________________
PHP / mySQL Developer
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #4 (permalink)  
Old 07-25-05, 07:32 AM
websmart's Avatar
websmart websmart is offline
Newbie Coder
 
Join Date: Jun 2004
Posts: 74
Thanks: 0
Thanked 0 Times in 0 Posts
Exclamation Custom PHP sessions

They have article on custom sessions here :
http://www.devarticles.com/c/a/MySQL...-PHP-Sessions/


I was hoping to get more easier method of passing variables page to
page but I am not much successful yet.


Post here if you have more on this.
__________________
Vyapari Trade Secrets
http://www.vyapari.com/maillist/
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Multiple sessions Kaanha PHP 2 01-16-04 11:39 AM
PHP sessions mno PHP 4 11-29-03 04:15 AM
PHP sessions mno HTML/XHTML/XML 3 11-28-03 01:49 PM
PHP & sessions, why won't it work? TinnyFusion PHP 1 10-04-03 02:51 PM
Sessions konigwolf PHP 3 09-11-03 03:09 PM


All times are GMT -5. The time now is 11:44 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.