Jump to content

Archived

This topic is now archived and is closed to further replies.

firelior

cookie question

Recommended Posts

Hi,
I was wondering, if I do login system with this code:
[code]
if(!isset($_COOKIE['password']) || !isset($_COOKIE['username'])){
exit("Wrong Username Or password");
}
[/code]
is it good to do this in every page?
so it will check if the user is logged in or not...or is there
another way to do this?
with session or something?

Share this post


Link to post
Share on other sites
You can place a session
when logging the user in, place a session
logged in user
YOu can do the same for coockies, just create on cookie, holding the username
and place that if there logged in

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.