PHP Cookie Problem

From: Date: Wed, 05 Dec 2001 00:01:02 +0000
Subject: PHP Cookie Problem
Groups: php.install 
Request: Send a blank email to php-install+get-5196@lists.php.net to get a copy of this message
Hi, I am having some problems with cookies not being set properly, seems to me that only the last cookie is being set. Here is the code, can anyone tell me if there are any problems with it? if($loginsubmit) { $password = md5($password); $query = $db->query("SELECT * FROM $table_members WHERE username='$username'"); $member = $db->fetch_array($query); if(!$member[username]) { echo "$lang_badname"; exit; } if($password != $member[password]) { echo "$lang_textpwincorrect"; exit; } $currtime = time() + (86400*30); $username = $member[username]; setcookie("xmbpw", $password, $currtime, $cookiepath, $cookiedomain); setcookie("xmbuser", $username, $currtime, $cookiepath, $cookiedomain); header("Location: index.php"); } (Code is part of XMBForum) Thanks in Advance. Tony

« previous php.install (#5196) next »