[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