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

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

Are you certain that your session is always started when you try to destroy it?

Yes, on top in page:

<?php
session_start();
?>
<html>
<head>
....
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.