<?php
$Test = "dsdsdad.dsad";
if (isset($_COOKIE["$Test"])) {
echo "I GOT A COOKIE WITH A PERIOD";
} else {
setcookie("$Test", "yes", time()+60*60*24*3);
}
$Test = "dsdsdaddsad";
if (isset($_COOKIE["$Test"])) {
echo "I GOT A COOKIE WITHOUT A PERIOD";
} else {
setcookie("$Test", "yes", time()+60*60*24*3);
}
?>
It seems that $_COOKIE[] will not accept anything with a period in it. However, the setcookie function sets both cookies fine. What is the way around this? I'd like it to read a cookie with a dot.