javascript - In PHP, how to destroy session and close the window? -


i want close tab destroy sessions in php.

i have piece of code, doesn't work well.

<?php session_start(); session_destroy(); ?>  <script language="javascript">   settimeout("self.close();",10000)   </script> 

help through, thanks.

edit: doesn't close window expected.

function openwin() { mywindow=window.open("","","width=200,height=100"); mywindow.document.write("<p>this 'mywindow'</p>"); }  function closewin() { mywindow.close(); } 

Comments

Popular posts from this blog

user interface - Python attempting to create a simple gui, getting "AttributeError: 'MainMenu' object has no attribute 'intro_screen'" -

jquery - Common JavaScript snippet to share files on Google Drive, Dropbox, Box.net or SkyDrive -

Android Gson.fromJson error -