note 64434 added to faq.build
| From: | hodukibi at yahoo dot com | Date: | Fri, 14 Apr 2006 09:54:53 +0000 |
| Subject: | note 64434 added to faq.build | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-108047@lists.php.net to get a copy of this message | ||
I just test file login.php but when I submit it show errors
session_start(): Cannot send session cookie and cannot modify header
information - headers already sent by ... I don't use echo or print
anything before
<body>
<?
$login = $_POST["login"];
if ($login==1) {
session_start();
$admin = "abc";
session_register("admin");
header("Location: admin.php");
}
?>
<form name="frmLogWP_User" method="post" action="login.php">
<input type="submit">
<input type=hidden name="login" value="1">
</form>
</body>
How can I fix this problem? If I run it on my computer (local) I run successful but run it on
internet it show
Warning: session_start(): Cannot send session cookie - headers already sent by (output started at
/home2/glass/avsstouristservices-www/tiepthivn/wcms/aaa.php:8) in
/home2/glass/avsstouristservices-www/tiepthivn/wcms/aaa.php on line 11
Warning: session_start(): Cannot send session cache limiter - headers already sent (output started
at /home2/glass/avsstouristservices-www/tiepthivn/wcms/aaa.php:8) in
/home2/glass/avsstouristservices-www/tiepthivn/wcms/aaa.php on line 11
Warning: Cannot modify header information - headers already sent by (output started at
/home2/glass/avsstouristservices-www/tiepthivn/wcms/aaa.php:8) in
/home2/glass/avsstouristservices-www/tiepthivn/wcms/aaa.php on line 14
----
Server IP: 66.163.161.117
Probable Submitter: 203.162.3.160 (proxied: 222.253.137.36)
----
X-Spam-Status: No, hits=4.0 required=5.0 tests=DATE_MISSING,FROM_NO_LOWER,
HTML_20_30,HTML_MESSAGE autolearn=no version=2.64
----
Manual Page -- http://www.php.net/manual/en/faq.build.php
Edit -- http://master.php.net/note/edit/64434
Del: integrated -- http://master.php.net/note/delete/64434/integrated
Del: useless -- http://master.php.net/note/delete/64434/useless
Del: bad code -- http://master.php.net/note/delete/64434/bad+code
Del: spam -- http://master.php.net/note/delete/64434/spam
Del: non-english -- http://master.php.net/note/delete/64434/non-english
Del: in docs -- http://master.php.net/note/delete/64434/in+docs
Del: other reasons-- http://master.php.net/note/delete/64434
Reject -- http://master.php.net/note/reject/64434
Search -- http://master.php.net/manage/user-notes.php