Still Logged In with cookie : _COOKIE « Cookie Session « PHP

Still Logged In with cookie

  $auth = $_COOKIE['auth'];

  header( "Cache-Control:no-cache" ); 

  if( ! $auth == "ok" ) 
    header("Location:login.php" );


  <title>Still Logged In</title>

  You are still logged in ...


Related examples in the same category

1.Checking for Cookie Support from PHP
2.Setting and Printing a Cookie Value
3.Get Cookie Data
4.Reading a cookie value
5.Printing a cookie value
6.Reading all cookie values