Pomoc - Szukaj - Użytkownicy - Kalendarz
Pełna wersja: Pilna pomoc potrzebna
Forum PHP.pl > Forum > PHP
nexis
Czemu tak się dzieje i czemu skrypt zwraca taki komunikat:

Kod
Warning: Cannot modify header information - headers already sent by (output started at /usr/local/apache/www/htdocs/grodzicki.com/html/Tjablonski/napisz.php:9) in /usr/local/apache/www/htdocs/grodzicki.com/html/Tjablonski/napisz.php on line 58


a skrypt wygląda tak:

[php:1:81a0b6f777]<?php
include('config.php');
if ($forum_logged=="true") {
if (!isset($submit)) { ?>
<form action="napisz.php" method="post">
<table align="center">
<tr>
<td>temat: </td>
<td><input type="text" name="topic" style="width: 400px"></td>
</tr>
<tr>
<td>tre&para;ć: </td>
<td><textarea name="text" rows="20" style="width: 400px"></textarea></td>
</tr>
<tr>
<tr>
<td>&nbsp;</td>
<td><input type="submit" name="submit" value="Wy&para;lij"></td>
</tr>
</table>
</form>
<?php }
else {
if (($topic==null) || ($text==null)) {
header("location:error.php?104");
exit;
} else {
$topic=strip_tags($topic);
$text=str_replace("n", "<br>", $text);
$text=strip_tags($text,"<b><u><i><br>");
$topic=addslashes($topic);
$text=addslashes($text);
$q="select max(id) from nexis_posts";
$d=mysql_query($q);
$r=mysql_fetch_array($d);
$max=$r[0];
$max++;
$today=date("d.m.y");
$q="insert into nexis_reply values ('$max','1','$forum_user','$today',curtime(),'$text')";
mysql_query($q);
$q="insert into nexis_posts values ('$max','$topic','$forum_user','$forum_user','$today',curtime())";
mysql_query($q);
$q="update nexis_users set posts=posts+1 where login='$forum_user'";
mysql_query($q);
header("location:watek.php?id=$max");
exit;
}
}
} else {
header("location:loguj.php");
exit;
}
?>[/php:1:81a0b6f777]
FiDO
Temat niezgodny z regulaminem!
Pozatym byl on poruszany wiele razy, zamykam.
Poszukaj pod haslem "headers already sent"
To jest wersja lo-fi głównej zawartości. Aby zobaczyć pełną wersję z większą zawartością, obrazkami i formatowaniem proszę kliknij tutaj.
Invision Power Board © 2001-2025 Invision Power Services, Inc.