Why can't I read a cookie I set in Javascript read in my PHP script? Is this not possible? I know the cookie is being set because I can find it on my computer. The problem is that PHP does not see it.
Here is javascript code to set the cookie:
<script language="JavaScript">
function CurrentCity(dropdown)
{
var myindex = dropdown.selectedIndex
var SelValue = dropdown.options[myindex].value
document.cookie = 'mycity = ' + SelValue + ' ; expires=Fri, 31 Dec 2002 23:59:59 GMT; path=/ ;';
}
</script>
Here is PHP code to read the cookie
if (empty($mycity)) {
print "not found"
} else {
print $mycity;
}
Thank You for your help!