Only the last cookie is set!

From: Date: Thu, 30 May 2002 02:39:56 +0000
Subject: Only the last cookie is set!
Groups: php.general 
Request: Send a blank email to php-general+get-99836@lists.php.net to get a copy of this message
Hi all, I have the following code : ************************************************************** setcookie("currentUserClass", $class, time()+3600, '', '', 0); setcookie("currentUserEmail", $emailId, time()+3600, '', '', 0); setcookie("currentUserName", $name, time()+3600, '', '', 0); if ($role & 8) { setcookie("isModerator", 'yes', time()+3600, '', '', 0); } *************************************************************** This code works fine in my local machine (all cookie variables are set with given values). When I took it to another server, only the last cookie gets set. ie, either $currentUserName is set or $isModerator is set based on the condition. To reassure, I interchanged the second cookie (currentUserEmail) & the third (currentUserName) set commands. Now also only the last cookie set is available for use. This is really puzzling me. Any lead will be appriciated. (I am using a free hosting server running php 4.1 on Linux.) Regards, Jagan

« previous php.general (#99836) next »