Author | Post | ||
sniperkid |
which is better to use sessid or cookies, by that i mean which is easier to check to see if they exist, like if i set the cookie; name = user-pass cookie = $user - $pass and how would i do them, i have tried some of them off www.php.net but i cant seem to get them work. thnx |
||
16.11.2004 15:24:22 |
|
||
unknown user |
it's better to use session vars, if you need security in primis, cookies are not so secure because they can be manipulated by programs like proxomitron etc. To use session vars, just make sure you start the session at the beginning of every page you need with session_start(); function. Then, to init a session var it's easy: take a look here http://it.php.net/manual/en/function.session-start.php. To use cookies is almost the same thing, even if the syntax changes a bit and you can see it also in php documentation. The main difference is this, session vars are stored on the server, so 1000 users connected together are 1000 vars on the server, while cookies are stored on the client so they don't occupy space or memory on the server (take this as a easy explanation ok?). Regards, sfabriz |
||
17.11.2004 16:16:47 |
|