Welcome Guest, Not a member yet? Register   Sign In
Not getting session values in IE after redirecting
#1

[eluser]Unknown[/eluser]
Hi,
I am not getting session values in IE.After validating user i am redirecting user to another page but it is not getting session values after redirecting. It is working fine in all other browsers
My controller is like this :

class test_login extends Controller {

function test_login()
{
parent::Controller();
$this->load->model('common_model');
}

function index()
{
$data['msg']="";
if(isset($_POST['Submit']))
{
$data['password']=$this->input->xss_clean($this->input->post('password'));
$data['emailId']=$this->input->xss_clean($this->input->post('emailId'));
if($this->common_model->numRow('members'," where emailId='$data[emailId]' and password='$data[password]'"))
{
$membersRow=$this->common_model->getOneRow('members'," where emailId='$data[emailId]' and password='$data[password]'");
if($membersRow->activeFlag=='0')
{
$data['msg']="Your Accout is not Activated yet !";
}

else
{
$session=array('aakikaUserId'=>$membersRow->memberId,
'aakikaUserEmailId'=>$membersRow->emailId,
'aakikaUserLogin'=>TRUE);
$this->session->set_userdata($session);
redirect('home','location');
}
}
else
$data['msg']="Email-Id/Password Does not match !";
} else {

$data['checkbox']=get_cookie('checkbox', TRUE);
$data['emailId']=get_cookie('emailid', TRUE);
$data['password']=get_cookie('password', TRUE);

}


$data['middlecontent']="testlogin_view";
$this->load->view('maincontent',$data);
}
}
#2

[eluser]InsiteFX[/eluser]
Hi,

Try this

Code:
if ($logged_in == FALSE)
{
     // use your own uri's for first part...
     redirect('/login/form/', 'refresh');
}

Enjoy
InsiteFX
#3

[eluser]Aken[/eluser]
IIRC, it has to do with redirecting the browser directly after setting the session data. You'll need to set a flag that is checked after the session data is established, and then redirect.
#4

[eluser]Unknown[/eluser]
Now i am facing another problem (:

My session values are lost while i pass parameters through URL in IE

After logged in, i am redirecting user to his profile page with his alice name in url,

redirect('profile/showProfile/'.$aliceName,'location');

my url will be as follows with "mkazi019" as alice name

http://192.168.1.17/projects/akkika/prof...e/mkazi019

On first attempt it has session values but when i refresh the page session values gets lost in IE.

What will be the problem...?




Theme © iAndrew 2016 - Forum software by © MyBB