Ygo's world About games, gaming and game development and coding in general


Cookies not working?

Well, when you are working for so long with mvc's and other libraries, one can forgot about the right syntax of row php code. Take for example setookie() which has the same number of arguments under Codeigniter. But the code copied from there didnt wanted to work. Why? Precious time loosed to the fact that in raw pho setcookie need the time to be set starting from January 1 1970, while set_cookie in CI just need the amount of time for the cookie to be active.
set_cookie("latitude", $this->input->get('lat'), 3*3600);

setcookie("latitude", $_GET['lat'], time()+3*3600,'/', $config["domain_name"]);

So, brush your basics and ask a friend. Is good to have friends.

Posted by ygo

Comments (0) Trackbacks (0)

No comments yet.

Leave a comment

Trackbacks are disabled.