can’t send cache limit cheaker and problem in back button session variable still dis

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • itsmenarwal
    New Member
    • Jan 2010
    • 20

    can’t send cache limit cheaker and problem in back button session variable still dis

    HI everyone

    1. As user enter username and password in sign-in-form.php then values are collected in sign-in-action-form.php page and the i am storing username into session variable like this In database i have a table named employee

    Code:
    <a href="logout_file.php">Sign Out</a>
    if (username and passwords are matched)
    {
    session_start();
    $_SESSION['employee']['id'] = $row['User_Id'];
    $_SESSION['employee']['username'] =$row['Username'];
    }
    then on each page i am passing logout-file.php link and checking session variable like this
    
    <body bgcolor="white">
    <a href="logout_file.php">Sign Out</a>
    <?php
    session_start();
    if(!isset($_SESSION['employee']))
    {
    echo "Your are Logged Out";
    exit;
    }
    else
    {
    echo "Welcome Mr.".$_SESSION['employee']['username']; //check it
    }
    ?>
    Body data like other links
    </body>
    Now on each page i have given links like this

    Now listen my problem on each page i am printing echo "Welcome Mr.".$_SESSION['employee']['username']; So think i am on signinactionpag e where there other link like show file,upload file etc.. with sign out button now as i click on sign out button i am redirected to login page(no probelm up to here) But when i press back button (now i am logeed out) then i am again in signinaction form and Mr.Deepak.Narwa l is still displaying there why so if i am looed out session destroyed and why this name is displaying..why so

    2. along with this one more error is displaying on each page which contain logout button and this session coading...

    Warning: session_start() [function.sessio n-start]: Cannot send session cache limiter - headers already sent (output started at E:\xampp\htdocs \upload_file.ph p:6) in E:\xampp\htdocs \upload_file.ph p on line 7
    My logout-file.php page is like this
    Code:
    <?php
    session_start();
    session_unset();
    session_destroy();
    header ("Location: signinform.php");
    ?>
    Last edited by Atli; Jan 25 '10, 02:45 PM. Reason: Added [code] tags.
Working...