Re: Sessions... Argh!

From: Date: Sat, 25 Nov 2000 20:31:57 +0000
Subject: Re: Sessions... Argh!
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-27173@lists.php.net to get a copy of this message
On Fri, Nov 24, 2000 at 09:00:40PM -0800, Liam wrote: > Ok... Im new to this sessions stuff, but here we go.. > > I have a script that authenticates your login/pass (roughly) that it > retrieves as a result of a form. I'd like to make my script be able > to start a session right after it verifies who is using the script. But > when use the following I get the below errors: > > if ($email == $dbemail && $password == $dbpass) { > echo "good login"; > include('startsession.php'); > exit; > > Warning: Cannot send session cookie - headers already sent by (output you have to set your cookies *before* echoing any content to the browser. remove that echo and any that might be in startsession.php before the setcookie function and you should be good to go.

« previous php.general (#27173) next »