I have a JavaScript script that sets a cookie if it is not present and the user is coming in from a certain site:
<script language="JavaScript" type="text/javascript">
// If the cookie is not present, begin is set to -1
begin = document.cookie.indexOf("pgtraffic=");
// If cookie is not present
if (begin == -1) {
var inThere = document.referrer.match(/imaging/g);
if (inThere) {
// Set cookie, expires when browser closes
document.cookie = "pgtraffic=yes;expires=" + "" + ";path=/";
}
}
</script>
Later on, a PHP script reads the cookie information and continues it's process based on whether or not the cookie is set:
// Import GET variables sent to this script into the global scope
import_request_variables("g");
// Check if pg cookie has been set, if not...
if (isset($_COOKIE['pgtraffic'])){
.
.
.
This is working just fine in FireFox 0.9, but IE6 isn't reading the cookie. I've checked both browsers to verify that the cookie is getting set in each individually, so I'm at a loss as to why IE is not cooperating. Any suggestions?