Jump to content

[SOLVED] Cookie not working in Internet Explorer


Thomisback

Recommended Posts

Hi,

 

I'm trying to set some cookies in PHP, in firefox it works perfectly but in Internet Explorer it just creates a loop.

This is my code:

$check = mysql_query("SELECT * FROM phaos_users WHERE UID='$userid'") or die(mysql_error());
while($row = mysql_fetch_array($check)){
$PHP_PHAOS_USER = $row['username'];
}


$PHP_PHAOS_MD5PW = md5($userid);
setcookie("PHP_PHAOS_USER",$PHP_PHAOS_USER,time()+17280000); // ( REMEMBERS USER NAME FOR 200 DAYS )
   	   	   setcookie("PHP_PHAOS_MD5PW",$PHP_PHAOS_MD5PW,time()+172800); // ( REMEMBERS USER PASSWORD FOR 2 DAYS )
    	   setcookie('lang',$lang,time()+17280000); // ( REMEMBERS LANGUAGE FOR 200 DAYS )
           setcookie("PHP_PHAOS_PW",0,time()-3600); // remove cookie used in version 0.88
	$result = mysql_query("SELECT * FROM phaos_characters WHERE username = '$PHP_PHAOS_USER'");
	if ($row = mysql_fetch_array($result)) {
		$PHP_PHAOS_CHARID	= $row['id'];
		$PHP_PHAOS_CHAR		= $row['name'];
	} else {
		$PHP_PHAOS_CHARID=0;
	}

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.