Hello,
I tried to upload in my website the following trial php file:
<FORM METHOD="POST" ACTION="prova.p hp">
<b>Combinatio n</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["combinatio ns"][] = ($_REQUEST["el1"].$_REQUEST["el2"]);
print_r($_SESSI ON["combinatio ns"]);
?>
As result, I obtain the following error:
Warning: session_start() [function.sessio n-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.sessio n-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
I tried to upload in my website the following trial php file:
<FORM METHOD="POST" ACTION="prova.p hp">
<b>Combinatio n</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["combinatio ns"][] = ($_REQUEST["el1"].$_REQUEST["el2"]);
print_r($_SESSI ON["combinatio ns"]);
?>
As result, I obtain the following error:
Warning: session_start() [function.sessio n-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.sessio n-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
Comment