note 64434 rejected from faq.build by bjori
| From: | bjori@php.net | Date: | Fri, 14 Apr 2006 11:41:01 +0000 |
| Subject: | note 64434 rejected from faq.build by bjori | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-108050@lists.php.net to get a copy of this message | ||
Note Submitter: hodukibi at yahoo dot com
----
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