Hi,I have created a script where I want to use onclick event and javascript to log out.Here r my coodes ..
Whenever,I reload the page,the sessions variables are destroyed without pressing the logout link...
I want know how this is achieved and how can I logout from a session..
Any help will be kindly appreciated.Tha nk s
Code:
<script type="text/javascript">
function logout(){
<?php session_destroy();?>
}
</script>
<body>
<a href="#" onclick="logout()">logout</a>
</body>
I want know how this is achieved and how can I logout from a session..
Any help will be kindly appreciated.Tha nk s
Comment