The following is my ajax call:
remote:
{
url:"http://localhost/my_site/index_page/validate_name",
type: "post"
}
So in the function validate_name, I set the session cookie as follows:
$username = "test1";
$this -> session -> set_userdata('username', $username);
Now after the ajax call is completed, I check for the session data in another controller like this,
if($this -> session -> userdata('username')=='test1')
it turns out that it returns false. Why is that?