HI GUYS..
im new in php..
i have this javascript for logout if user is inactive.. How can a user be automatically be loggedout when they close the browser.
<script type="text/javascript">
window.onload = function () {
refreshy = setTimeout("window.location='logout.php' ", 60000); //seconds
}
window.onmousemove = function() {
stopCount();
startCount();
}
function stopCount() {
clearTimeout(refreshy);
}
function startCount() {
refreshy = setTimeout("window.location='logout.php' ", 60000);
}
</script>

