session_start()
function and $_SESSION
is superglobals variable.Similar to the cookies start session before <html>
tag.
Syntax: session_unset()
and session_destroy()
.
[php]
<!DOCTYPE html>
<?php session_start(); ?>
<html>
<body>
<?php
session_unset(); // removes all session variables
session_destroy(); // destroy the session
?>
</body>
</html>[/php]