Welcome Guest, Not a member yet? Register   Sign In
logout without unsing cron-job
#1

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
Reply


Messages In This Thread
logout without unsing cron-job - by ak2dwd - 04-10-2019, 12:30 AM
RE: logout without unsing cron-job - by InsiteFX - 04-10-2019, 03:41 AM



Theme © iAndrew 2016 - Forum software by © MyBB