dear friend,
i want to make function that working are than user can close this broswer ,than after 10 second he logout and his update status user table column name logout yes, i am try this code...
function logout()
{
............update query...........
.............................
...............................
...........session destoy......
}
<script>
var stinterval;
stinterval=setInterval(unsetsession,5000);
function unsetsession(){
var url= '<?=base_url('logout1')?>';
$.get(url,function(data){
if(data)
{
clearInterval(stinterval);
window.location.reload();
}
});
}
</script>
but in case when browser clode than script are no working