Subject: fixing the 'headers already sent' warning/error
Posted By: ire Post Date: 8/19/2006 7:20:04 AM
I'm sure this is a common problem and while I have found some answers to this question, I have a slightly different scenario here:
My index.php code requires my header.php file- which calls the session_start() function. The header.php comes in within the div element  and simply goes:
...
<body>
  
      <div id="wrapper">
<?php
        require("header.php");
?>      
</div>
...
with this arrangement, I get the error- "Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by..." twice in a row.
My presentation logic is a three column layout in a wrapper. Placing the above php code at the top does work, but also defeats the purpose of my box model. What please is the best way out. Thanks

Reply By: hymns Reply Date: 8/21/2006 7:35:49 AM
session_start() must put before <html><head>... tags.


Go to topic 48592

Return to index page 198
Return to index page 197
Return to index page 196
Return to index page 195
Return to index page 194
Return to index page 193
Return to index page 192
Return to index page 191
Return to index page 190
Return to index page 189