I got a problem when im trying to keep the session alive even if the browser is closed
When the user push 'Remember me' checkbox it will save the cookies
<input type='checkbox' name='me' value='r'>
Well, i have tried the following:
<?php
session_start ();
$_SESSION['key'] = 'myprivatekey';
if (!isset($_SESSION['key']){
die ();
}else{
if ($_POST['me'] == 'r'){
setcookie(session_name (), session_id (), time()+11111111);
}
}
echo 'passed';