Welcome Guest, Not a member yet? Register   Sign In
prblem in reading Cookie value
#1

[eluser]ahmadalyan[/eluser]
i was trying to write my own library and i want to use cookie in it so i wrote
Code:
$CI =& get_instance();
$CI->input->set_cookie($this->auth_config['user_id'],$user_id );
$CI->input->set_cookie($this->auth_config['user_guid'],$user_guid );
$CI->input->set_cookie($this->auth_config['ip_address'],$ip_address );
$CI->input->set_cookie($this->auth_config['user_agent'],$user_agent );
$CI->input->set_cookie($this->auth_config['last_login'],$last_login );

and when try to used the cookie i wrote

Code:
$CI =& get_instance();
$user_id = $CI->input->cookie("user_id");
$user_guid = $CI->input->cookie("user_guid");
$user_agent = $CI->input->cookie("user_agent");
$last_login = $CI->input->cookie("last_login");

but the value of the variable return false

and when i try to write var_dump ($_COOKIE) i got this

Code:
array (size=2)
  'PHPSESSID' => string '7j0a2cc34rv5ro4b83v7rtb2m2' (length=26)
  'ahmadalyan_blog' => string 'a:6:{s:10:"session_id";s:32:"d8fe12fe8c4d99ac89d75df26610fc3a";s:10:"ip_address";s:9:"127.0.0.1";s:10:"user_agent";s:65:"Mozilla/5.0 (Windows NT 6.1; rv:17.0) Gecko/20100101 Firefox/17.0";s:13:"last_activity";i:1357325670;s:9:"user_data";s:0:"";s:8:"language";s:6:"arabic";}b4b2fa7c5db11174a16a2331523b81cb' (length=306)


Messages In This Thread
prblem in reading Cookie value - by El Forum - 01-04-2013, 12:02 PM
prblem in reading Cookie value - by El Forum - 01-05-2013, 10:01 AM
prblem in reading Cookie value - by El Forum - 01-05-2013, 10:04 AM
prblem in reading Cookie value - by El Forum - 01-07-2013, 10:49 AM
prblem in reading Cookie value - by El Forum - 01-07-2013, 12:14 PM
prblem in reading Cookie value - by El Forum - 01-08-2013, 12:35 PM
prblem in reading Cookie value - by El Forum - 01-08-2013, 12:39 PM
prblem in reading Cookie value - by El Forum - 01-08-2013, 03:29 PM



Theme © iAndrew 2016 - Forum software by © MyBB