Jump to content

Cookie not setting, no error


aleX_hill

Recommended Posts

I am trying to set a cookie like so:

$cookieresult = setcookie("schoolname",$_POST['school'],time()+1000000);

 

$cookieresult holds the value "1" after this, but when i print_r($_COOKIE) it doesnt show up and there seems to be no cookie set.

 

The same happens if I replace the $_POST['school'] with a string like "hi".

 

Any ideas?

Link to comment
https://forums.phpfreaks.com/topic/195263-cookie-not-setting-no-error/
Share on other sites

Archived

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

×
×
  • Create New...

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.