As mentioned earlier, we also use the unset()
function in session deletion.
<?php
session_start();
$_SESSION['planet'] = 'Earth';
unset($_SESSION['planet']);
?>
Above, we created a session and then deleted it.
Published
As mentioned earlier, we also use the unset()
function in session deletion.
<?php
session_start();
$_SESSION['planet'] = 'Earth';
unset($_SESSION['planet']);
?>
Above, we created a session and then deleted it.