here is my logout.php
please, just tell me if this is the right way.
<?
include ("session.inc.php");
session_start();
$_SESSION = array();
if (isset($_COOKIE[session_name()])) {
setcookie(session_name(), '', time()-42000, '/');
}
session_unset();
session_destroy();
include("../inc/connect.php");
$result2 = mysql_query("DELETE FROM foo_sessions");
header( 'Location: index.php' ) ;
?>