Re: Warning: session_start()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 19/05/11 10:37, Tim Streater wrote:
On 19 May 2011 at 10:20, Richard Quadling<rquadling@xxxxxxxxx>  wrote:

On 18 May 2011 19:15, Nazish<nazish@xxxxxxx>  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

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux