Welcome Guest, Not a member yet? Register   Sign In
having problem with session expire
#1

[eluser]gayathri[/eluser]
hi all,

i want to expire my session automatically 2 mins ones, for that i have set cookie also, but its not expired, i am new to php, so kindly can you tell me, how to expire the session for 2 mins once automatically, i have used php session and cookie helpers, cookie is displaying the name by using the get_cookie. but its not expiring automatically.

Controller
Quote:$this->phpsession->save('name',$name,'mynamespace');
$this->phpsession->save('place',$place,'mynamespace');
set_cookie("testcookie","testdata",120);

view:

Quote:<?php
echo "Cookie--".$wtestdata = get_cookie("testcookie");
?>
<? $ses=$this->phpsession->get(null,'mynamespace');
if(!isset($ses)) {
redirect('login', 'index');
} ?>
#2

[eluser]pvijayanands[/eluser]
Can u plz check the Session and Cookies libraries.......




Theme © iAndrew 2016 - Forum software by © MyBB