Session Time Out Settings Using PHP Code

Collapse

Unconfigured Ad Widget

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • Shane
    Senior Member
    • Jun 2006
    • 264

    Session Time Out Settings Using PHP Code

    Hello All,

    In order to set session timed out limit in PHP file one can use below mentioned code:

    <?php
    session_start();

    session_cache_expire(15);
    $cache_expire = session_cache_expire();

    if(!isset($_SESSION['password']))
    {
    $msg = "Your session is expired...Please login again";
    header("Location: index.php?msg=".$msg);
    }
    ?>

    Thanks,

    Shane G.
    AccuWebHosting.Com
Working...
X