PHP

REMEMBER LOGIC IN LOGIN

On Login: if(isset($_POST[‘remember’])) { $month = time() + ( ( 3600 * 24 ) * 30 ); setcookie(‘remember_me’, $user_id, $month); } else { $past = time() – 100; setcookie(‘remember_me’, ”, $past); } On Logout: $past = time() – 100; setcookie(‘remember_me’, ”, $past); if( isset($_COOKIE[‘remember_me’]) AND trim($_COOKIE[‘remember_me’] ) != “” ) { //Store the sessions which […]