Jump to content
  • Advertisement

Archived

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

Monder

PHP Cookie Problem

This topic is 5504 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Ok I'm writing a simple login system for my site in php but for some reason cookies don't seem to be working. I'm sure I'm doing something. I set the cookie like so
  if(setcookie("HempSession", $SessionID, time( )+100000000000)==true)
{
	echo "Cookies work!!!!!";
}      
When I login it says Cookies work!!!! on the page so setcookie has returned true meaning it should've been set successfully. I then access it like this $SessionID = $_COOKIE['HempSession']; only $SessionID ends up blank and I can't find the cookie in my IE cookies dir (I cleared it out so it would be easy to spot). I've tried using $HTTP_COOKIE_VARS to access it but that didn't help. The problem seems to be that it's not being set in the first place even though it reports back it did. Anyone got any ideas on what's going wrong? [edited by - Monder on April 29, 2003 6:16:23 PM]

Share this post


Link to post
Share on other sites
Advertisement

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!