|
Posted by theCancerus on 12/11/06 07:45
hello nico,
this error comes when you send anything to browser before starting
session. this happens with any header function you may use. to solve
this you must put "session_start()" at the start of php the page as i
had shown you in your the previous post.
this will solve your problem.
cheers
Amit
On Dec 11, 12:37 pm, Nico <noem...@noemail.com> wrote:
> Hello,
>
> I tried to upload in my website the following trial php file:
>
> <FORM METHOD="POST" ACTION="prova.php">
> <b>Combination</b><br><br>
> Element 1: <INPUT NAME="el1" TYPE="TEXT">
> <BR>
> Element 2: <INPUT NAME="el2" TYPE="TEXT">
> <br>
> <INPUT TYPE="SUBMIT" VALUE"Submit">
> </FORM>
> <br>
> Combination<br><br>
> <?php
>
> session_start();
> $_SESSION["combinations"][] = ($_REQUEST["el1"].$_REQUEST["el2"]);
> print_r($_SESSION["combinations"]);
> ?>
>
> As result, I obtain the following error:
>
> Warning: session_start() [function.session-start]: Cannot send session
> cookie - headers already sent by (output started at
> /home/httpd/docs/prova.php:12) in /home/httpd/docs/prova.php on line 13
>
> Warning: session_start() [function.session-start]: Cannot send session
> cache limiter - headers already sent (output started at
> /home/httpd/docs/prova.php:12) in /home/httpd/docs/prova.php on line 13
>
> Sessions don't work.
> Can you help me to understand which is the problem and how can I solve
> it please?
> Many thanks.
>
> Cheers,
> Nico
[Back to original message]
|