I tried many times to make this work, and I can't... I am a PHP beginner and I'd like to know how to do that. I know there is a way of using buttons but I need to use the "a" command for my website design...
this is my code:
<form method="post">
        <li class="nav-item">
      <a name="logout_button" value="logout_button" class="nav-link navbar_loginout" type="submit">Logout</a>
    </li> 
    </form>
<?php
if (isset($_POST["logout_button"])) {
  echo "hi";
  $_SESSION["allowed"] = 0;
}
?>
