Monday, June 18, 2012

How to create log file of session in php

if(isset($_GET['logout'])){   
   
    //Simple exit message
    $fp = fopen("log.html", 'a');
    fwrite($fp, "<div class='msgln'><i>User ". $_SESSION['name'] ." has left the chat session.</i><br></div>");
    fclose($fp);
   
    session_destroy();
    header("Location: index.php"); //Redirect the user
}

No comments:

Post a Comment

Thank you for your Comment....

Popular Posts