Header sent polem

From: Date: Fri, 17 Jan 2003 17:55:49 +0000
Subject: Header sent polem
Groups: php.general 
Request: Send a blank email to php-general+get-132022@lists.php.net to get a copy of this message
Hi all, Following Chris's idea on how to handle visitors sessions, I'm trying to setup a cookie with a randomly generated session ID but it throws me the "headers already sent" notice but there's nothing above the setcookie function. Here's part of my code: <? if (!isset($sessid)) { require_once("PasswordGenerator.php"); $Password = new PasswordGenerator(10, 10); $RandPassword = $Password->getHTMLPassword(); setcookie("sessid", "".print($RandPassword)."", time()+3600); } else if (isset($sessid)) { echo "$sessid"; } [---snip---] and after all this is then called the header and main files... What is getting outputted to the browser? Thanks in advance, Cesar L. Aracena icaam@icaam.com.ar caracena@infovia.com.ar (0299) 156-356688 Neuquén (8300) Capital Argentina

« previous php.general (#132022) next »