Forum Moderators: coopster

Message Too Old, No Replies

layouts and php

         

brendan3eb

11:47 pm on Aug 6, 2004 (gmt 0)

10+ Year Member



For my next site, I am making a content management system. Now I face the problem of having sessions without getting an error. Is there a way around this?

IanKelley

12:13 am on Aug 7, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



What kind of error are you referring to?

brendan3eb

12:18 am on Aug 7, 2004 (gmt 0)

10+ Year Member



headers already sent, I know what it means, I'm just looking for away around it other than iframes.

brendan3eb

12:30 am on Aug 7, 2004 (gmt 0)

10+ Year Member



eh, I just found myself a solution, here it is:
<?
session_start() ;
if($act == fgf)
{
}
if(file_exists("$wm.htm"))
{ include("$wm.htm") ; }
else { include("error.htm") ; }
?>
before I had the html around the php.

jatar_k

5:40 am on Aug 7, 2004 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



?

>> headers already sent

that means you tried to start a session after you sent output to the browser

session_start needs to occur before anything is sent to the browser, even a space or an empty line