Announcement

Collapse
No announcement yet.

Session Time Out Settings Using PHP Code

Collapse

Ads on showthread pages

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Session Time Out Settings Using PHP Code

    WordPress Hosting on SSD Servers
    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
Sign up for a News Letter Click here to sign up