I have created a form using PHP. I am trying to include this form on regular html pages, but I am getting a session error. Here is what I have set up: example.htm calls external .php file using
include("../file.php");
Inside file.php, session is started using
session_start();
Now, when I view example.htm, the form loads within the document just fine, but there is a warning:
Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /example.htm:6) in /file.php on line 14
Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /example.htm:6)
Apparently, a session can't be started in the php file since one was already started when information was first sent to the browser from example.htm. So, my question is, how do I get around this? How can I pass the session info from the parent document to the php without starting a new one?
This is so irritating.