I have set session_start()
on every page. Now, I want to unset session
<div style="text-align: center;">
<a href="clearorder.php">Clear order</a>
</div>
Here is my clearorder.php
<?php
session_start();
$_SESSION["cart"] = array();
session_destroy();
header('location:'.$_SERVER['HTTP_REFERER']);
?>
But the session is not clearing and displaying the data of the session. What could I be missing?