Re: Warning: session_start()

From: Date: Thu, 19 May 2011 10:35:50 +0000
Subject: Re: Warning: session_start()
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-312908@lists.php.net to get a copy of this message
On 19/05/11 10:37, Tim Streater wrote:
On 19 May 2011 at 10:20, Richard Quadling<rquadling@gmail.com> wrote:
On 18 May 2011 19:15, Nazish<nazish@jhu.edu> wrote:
Hi everyone,
<!-----------------------------------------------------------------------
            WHEN USER CLICKS 'ENTER' TO LOGIN
<!------------------------------------------------------------------------> <?php
code, code, code.
?>
The session cookie must be sent prior to any output. Including, but not limited to, comments, whitespace, HTML code, etc.
2 - Remove all white space. Personally, this is the route I would use.
For the sake of completeness, that is whitespace *outside* the<?php ?> tags. tim
The comment should really be inside the php block: <?php /* WHEN USER CLICKS 'ENTER' TO LOGIN */ ... code ... ?> otherwise (notwithstanding the session_start() problem) you'll get the comments in you HTML source - probably not what you wanted... -- Peter Ford, Developer phone: 01580 893333 fax: 01580 893399 Justcroft International Ltd. www.justcroft.com Justcroft House, High Street, Staplehurst, Kent TN12 0AH United Kingdom Registered in England and Wales: 2297906 Registered office: Stag Gates House, 63/64 The Avenue, Southampton SO17 1XS

« previous php.general (#312908) next »