I know there is a tag to read the sessionsmarty.session.. tag but is there tag for destroying the session, like smarty.session.destroy?
What I want is when I click on menu button Data to destroy all stored sessions and start over with clean session.
This is the button that I have
<a href="/data.php" {if $smarty.server.PHP_SELF == "/data.php"}class="selected"{/if}><span>{php}echo __('Data'){/php}</span></a>
I have session destroy in my PHP code where I detect if there is addition parameter in the URL to destroy it and re-load the page with clean session but I don't know if there is such thing for buttons. This is my php
if((isset($_GET['data'])) {
session_destroy();
header("Location: data.php");
exit;
}
So, if user is on https://example.com/data.php?data and refresh the page will load https://example.com/data.php with destroyed sessions.
How can I accomplish the same with the menu button click?