31Jan/130
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.
Codeigniter
set_cookie("latitude", $this->input->get('lat'), 3*3600);
PHP
setcookie("latitude", $_GET['lat'], time()+3*3600,'/', $config["domain_name"]);
So, brush your basics and ask a friend. Is good to have friends.
Enjoy this article?
Posted by ygo
Tagged as: codeigniter, cookie, PHP
Leave a comment
Recent articles
- Chip cioplit
- Zoe! Fii bărbată
- Unde dai si unde crapă
- Burtoiul
- La capatul galaxiei
- mySQL trick for update/insert
- Banc
- POCOS – Programul National de Combatere a Obiceiurilor Sanatoase
- Paine si sare pentru un extraterestru
- CSS3 how to blink
Blogroll
Tag Cloud
bad drivers
battle.net
blizzard
C&C
casino
cazino
china
codeigniter
cookie
Deck13
Entropia
ET
free download
galaxie
game
genghis khan
hot
javascript
jQuery
machinima.
mmo
mmorpg
mmprpg
nintendo
nVidia
ogre3D
ospitalitate
PHP
Proza
realitate
reforma
religie
roboti
rpg
rts
satira
sf
speranta
starcraft
starcraft 2
steve streeting
torque
vizitatori
world of warcraft
wow
Leave a comment
You must be logged in to post a comment.