try this code:
session_start();
session_unregister('uname');
session_destroy();
header ("Location: login.php");
Shanti C
Posting Virtuoso
1,642 posts since Jul 2008
Reputation Points: 137
Solved Threads: 162
all you need to do to destroy a session is call
session_destroy();
you don't need to unset variables before then.
session_unregister is depreciated anyway.
if you want to remove something like the uname part of the session array just use
unset($_SESSION['uname']);
kkeith29
Nearly a Posting Virtuoso
1,357 posts since Jun 2007
Reputation Points: 235
Solved Threads: 194