du kunne lave det med noget ala det her:
- <a href='logout.php?wait=1'>log af</a>
-
- #logout.php
- if(isset($_GET["wait"]) && $_GET["wait"] == 1) {
- echo "<h1>wait..</h1>";
- echo "<script type='text/javascript'>setTimeout(function(){ window.location.href='?wait=0'; }, 1000*60);</sctipt>";
- }else{
- //log af php kode her.
- $_SESSION["login"] = NULL;
- }