wasn't too sure my codes are correct could sum1 help me check?ty.

<?php session_start();
unset($_SESSION['email']);
session_destroy();
?>

the first one will clear only that variable.
the second one will clear the session. so the other browser windows referring to the site for which you have did the session destroy will loose all the session variables... this is one simple explanation i have given...

the sessionid will remain the same unless you regenerate the session id or refreshing the browser

<?php
 session_start();
 unset($_SESSION['email']);
 session_unset();
 session_destroy();
  setcookie ("email", "",time()-60*60*24*100, "/"); 

echo "<meta http-equiv=\"refresh\" content=\"1;url=login.php\">" ;

?>

may be try like this....

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.