Jump to content

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;
	}

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.