Welcome Guest, Not a member yet? Register   Sign In
Keeping CI Session Alive
#1

[eluser]nagata[/eluser]
I have small problem, I need to keep my websites user session alive...
I tried to use Ajax,
I created a small function in controller, routed it right way,
Wrote jQuery Ajax code to request that uri each minute (small for testing...)
But it dosent seem to update other info of user...
the prefab view
Code:
<?php
$ident=$this->session->userdata('id');
if ($ident) {
$this->users_model->i_am_on($ident);}
?>
the renew function in controller
Code:
function renew()
{
$this->load->view('templates/prefab');
}
the jQuery code in the header template that calls the renew function
Code:
[removed]  
        function show()  
        {  
            $.ajax({  
                url: "/index.php/member/renew",  
                cache: false,  
                success: function(html){}
            });    
        }  
  
  $(document).ready(function() {
         show();  
            setInterval('show()',1000*30);   //Updates each 30 seconds...
  });
  
  
  [removed]

So guys, any help on making it work, or any other aproac to this problem?
I need this...
Also If possible with code Smile


Messages In This Thread
Keeping CI Session Alive - by El Forum - 06-14-2012, 01:24 AM
Keeping CI Session Alive - by El Forum - 06-14-2012, 03:28 AM
Keeping CI Session Alive - by El Forum - 06-14-2012, 10:31 AM
Keeping CI Session Alive - by El Forum - 06-14-2012, 10:35 AM
Keeping CI Session Alive - by El Forum - 06-14-2012, 10:44 AM
Keeping CI Session Alive - by El Forum - 06-14-2012, 12:19 PM
Keeping CI Session Alive - by El Forum - 06-14-2012, 12:44 PM



Theme © iAndrew 2016 - Forum software by © MyBB