Jump to content


Photo

cookie question


  • Please log in to reply
1 reply to this topic

#1 firelior

firelior
  • Members
  • PipPip
  • Member
  • 26 posts

Posted 22 September 2006 - 07:33 PM

Hi,
I was wondering, if I do login system with this code:
if(!isset($_COOKIE['password']) || !isset($_COOKIE['username'])){
	exit("Wrong Username Or password");
}
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?

#2 onlyican

onlyican
  • Members
  • PipPipPip
  • Advanced Member
  • 921 posts
  • LocationHants - UK

Posted 22 September 2006 - 07:52 PM

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
Tell me the problem, I will try tell you the solution




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users