This might a weird question, but I'm able to set cookies OUTSIDE of a function, but not inside of a function. maybe somebody has come across this before. I'm using PHP 5.2.1 Here's the code that I have, the utoutside coookie sets fine, the utinside cookie DOES not set, I've never seen this before, any ideas on how to remedy this?
$domainName = "example.com";
function MyCookie()
{
global $_COOKIE, $GLOBALS;
setcookie('utinside','inside',2147483647,'/','.'.$domainName.'');
return true;
}
MyCookie();
setcookie('utoutside','outside',2147483647,'/','.'.$domainName.'');
$domainName = "example.com";
function MyCookie()
{
global $_COOKIE, $GLOBALS;
setcookie('utinside','inside',2147483647,'/','.'.$domainName.'');
return true;
}
MyCookie();
setcookie('utoutside','outside',2147483647,'/','.'.$domainName.'');