Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
Old 12-15-2008, 06:30 AM [HELP]PHP sessions
Novice Talker

Posts: 5
Name: born2hack
Location: Internet
Trades: 0
Hi all, I am a PHP programmer and I mainly working the cURL and MySQL fields, over the past years I have learned a lot from Net including various programming language both Server-side and Desktop Standalone. Unfortunately I had a big problem of SKIPPING things I didn't need @ that time. Recently I have been working on one of My Projects and someone suggested me to use sessions under user management,...I know a bit about sessions but neither the Syntax and nor How to work. Anyone out there wanna shoot me with the basics? I will be glad if you do
born2hack is offline
Reply With Quote
View Public Profile Visit born2hack's homepage!
 
 
Register now for full access!
Old 12-15-2008, 07:23 AM Re: [HELP]PHP sessions
tripy's Avatar
Do not try this at home!

Posts: 3,621
Name: Thierry
Location: I'm the uber Spaminator !
Trades: 0
The session is a temporary, (more or less) isolated storage that is valid during the time the user browse on your site.
It's contained into the $_SESSION array.

And as always, the php.net manual is the first place to look for clues:
http://www.php.net/manual/en/intro.session.php
__________________
Only a biker knows why a dog sticks his head out the window.
tripy is offline
Reply With Quote
View Public Profile Visit tripy's homepage!
 
Old 12-15-2008, 08:13 AM Re: [HELP]PHP sessions
Defies a Status

Posts: 1,606
Trades: 0
Tripy gave you the basics ask follow up questions when ready.
__________________
Colbyt

Please login or register to view this content. Registration is FREE
colbyt is offline
Reply With Quote
View Public Profile
 
Old 12-15-2008, 09:47 AM Re: [HELP]PHP sessions
Novice Talker

Posts: 5
Name: born2hack
Location: Internet
Trades: 0
Well, I always use google before asking and I had a look @ php.net but don't worry, I guess I should try it back and then ask questions. My first one is.

User comes to my site -> Logs in -> does some stuff -> goes to google in same window -> does some stuff -> comes back to my site.

Is he still logged in? How much gap it is before user gets logged out?

Thanks!
born2hack is offline
Reply With Quote
View Public Profile Visit born2hack's homepage!
 
Old 12-15-2008, 11:22 AM Re: [HELP]PHP sessions
tripy's Avatar
Do not try this at home!

Posts: 3,621
Name: Thierry
Location: I'm the uber Spaminator !
Trades: 0
Quote:
Is he still logged in?
If the time he passes aways is smaller than the configured garbage collector time out, yes
Quote:
How much gap it is before user gets logged out?
It depends on the setting "session.gc_maxlifetime" in php.ini
http://www.php.net/manual/en/session.configuration.php
Quote:
session.gc_maxlifetime specifies the number of seconds after which data will be seen as 'garbage' and cleaned up. Garbage collection occurs during session start.
__________________
Only a biker knows why a dog sticks his head out the window.
tripy is offline
Reply With Quote
View Public Profile Visit tripy's homepage!
 
Old 12-16-2008, 07:53 AM Re: [HELP]PHP sessions
Novice Talker

Posts: 5
Name: born2hack
Location: Internet
Trades: 0
Thanks for all your help!
born2hack is offline
Reply With Quote
View Public Profile Visit born2hack's homepage!
 
Reply     « Reply to [HELP]PHP sessions
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 1.00880 seconds with 12 queries