0

Hi,
When I am using one session all right.
But now I have 4 sessions and if they click the Log Out error is thrown:

Warning: session_destroy() [function.session-destroy]: Session object destruction failed in D:\wamp\www\index2.php on line 25

25 line is:
session_destroy();

My code:

if(isset($_GET['Logout'])) {
    $query = 'UPDATE user SET
    time = "0000:00:00:00:00:00" WHERE user = "'.$_SESSION['name'].'"';
    $sql = mysql_query($query, $db_link) or die("Error");

    session_destroy();

    echo "<meta http-equiv='refresh' content='1;URL=index.php'>";
   exit;
}

echo '<a href=?Logout>Logout</a>';

Does not understand what it's bad.
Thanks in advance for the help

3
Contributors
4
Replies
5
Views
8 Years
Discussion Span
Last Post by Lolalola
0

I use: session_destroy();
Now i try and $_SESSION = array();
but still show this error

0

Yes, on top in page:

<?php
session_start();
?>
<html>
<head>
....
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.