what do u prefer? session or cookie

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
pleigh
Forum Contributor
Posts: 445
Joined: Wed Jan 19, 2005 4:26 am

what do u prefer? session or cookie

Post by pleigh »

hi there,

just wanna know from u guys out there your preference between the use of sessions or cookies....can u pick just one of them?

thanks in advance

pleigh
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

you want us to pick a preference? easy, sessions.
User avatar
pleigh
Forum Contributor
Posts: 445
Joined: Wed Jan 19, 2005 4:26 am

Post by pleigh »

hey feyd, thanks very much...i also thought of that but not very sure coz i'm just a newbie in php. thanks again.
User avatar
patrikG
DevNet Master
Posts: 4235
Joined: Thu Aug 15, 2002 5:53 am
Location: Sussex, UK

Post by patrikG »

not to spoil anything, but sessions use cookies to identify the session with (session_id). If they can't set a cookie, the session_id is passed via GET.
ckuipers
Forum Commoner
Posts: 61
Joined: Mon Mar 24, 2003 6:10 am

Post by ckuipers »

Depends what you need to use it for...
In most cases it's best to use sessions, in some you need to use cookies.
bla5e
Forum Contributor
Posts: 234
Joined: Tue May 25, 2004 4:28 pm

Post by bla5e »

since i dont know how to use cookies..


sessions
Post Reply