Reputation: 2866
I want to create session and it should be remove at 3 days later.
How do I do that ? I checked out the documents and questions in here, but found nothing..
-what I want exactly ?
session()->put("suspect",true,strtotime($time_diff))
is that possible ?
Upvotes: 1
Views: 1386
Reputation: 1445
$_SESSION['expire'] = time() + 259200; // 3 days
if(time() > $_SESSION['expire'])
{
session_unset();
session_destroy();
}
Upvotes: 1