<? session_start(); session_destroy(); ?> <script type="text/javascript"> alert("OK"); window.location.href = 'index.php'; </script>