note 58103 deleted from function.headers-sent by jome
| From: | jome@php.net | Date: | Mon, 24 Oct 2005 16:19:44 +0000 |
| Subject: | note 58103 deleted from function.headers-sent by jome | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-97519@lists.php.net to get a copy of this message | ||
Note Submitter: Ahau_man
----
Hi all , i got the problem with this insert.php file..
where my server web address is http://ahau.twbbs.org/NTUISA_chat1/login.php
then after user already login,when user want to type a message. this program got error. the error is
show below :
Warning: Cannot modify header information - headers already sent by (output started at C:\Program
Files\Apache Group\Apache2\htdocs\NTUISA_chat1\insert.php:8) in C:\Program Files\Apache
Group\Apache2\htdocs\NTUISA_chat1\insert.php on line 35
=============================================
the insert.php is show below :
<html>
<head>
<title>Inserimento del messaggio</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<?
include("config.php");
$nick=$_GET['nick'];
$password=$_GET['password'];
$messaggio=$_GET['messaggio'];
$messaggio=stripslashes($messaggio);
$messaggio=str_replace("\n"," ",$messaggio);
$commento=$nick."|".$messaggio."\n";
$url="chat.php"."?nick=".$nick."&password=".$password;
$cercamsg = strstr($messaggio,"<");
$cercamsg2 = strstr($messaggio,">");
if (empty($messaggio))
{
header("Location: $url");
}
elseif ($cercamsg & $cercamsg2)
{
$header("Location: $url");
}
else
{
$apri_file=fopen($file_mess,"a+");
fputs($apri_file,$commento);
fclose($apri_file);
header("Location: $url");
}
?>
</body>
</html>
THANKS FOr THIs help..