Re: Session (maybe cookies)

From: Date: Tue, 03 Feb 2004 18:59:06 +0000
Subject: Re: Session (maybe cookies)
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-176713@lists.php.net to get a copy of this message
On Tue, 2004-02-03 at 13:44, Rolf van de Krol wrote: > I tried to start a session by this code: > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" > "http://www.w3.org/TR/html4/loose.dtd"> > <html> > <head> > <title>Untitled Document</title> > <meta http-equiv="Content-Type" content="text/html; > charset=iso-8859-1"> > </head> > > <body> > <?php session_start(); > echo(session_id()); > ?> > </body> > </html> The session_start() function call needs to be at the top of the page, before you send any html to the browser. -- Adam Bregenzer adam@bregenzer.net

« previous php.general (#176713) next »