Sesson handling with cookie

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

PHP 4.2.2, MySQL 3.23.xx

I have a problem destorying the actual session_id (SID)?
I tried to use session_destroy(), session_unset, but nothing works, session_id() is always the same.


What I want to do is:
- After 30 Minutes if the user didn't do any work then let the session die
- It must be work wheter browser's cookie is set or not?

What Should I do to let it work?

I successfully check if 30 minutes left after last (site)change, but I can't give a new Session_id(), after I let the user redirect onto the login page?

Bye
Alex

Background:
- I save the login information into database with the following columns:

CREATE TABLE `LOGIN` (
  `MKMKOD` varchar(20) NOT NULL default '',
  `SESSION` varchar(255) NOT NULL default '',
  `LOGIN_TIME` datetime NOT NULL default '0000-00-00 00:00:00',
  `HOST` varchar(15) NOT NULL default '',
  `CURRENT_STATE` varchar(255) default ''
) TYPE=MyISAM;

- I check if it's over 30 minutes, on the current request:
'SELECT * FROM LOGIN WHERE MKMKOD = "'.$_mkmkod_.'" AND (DATE_SUB(NOW(),INTERVAL 30 MINUTE) <= LOGIN_TIME) AND HOST = "'.$_SERVER['REMOTE_ADDR'].'"'


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux