Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Closed TopicStart new topic
> Pilna pomoc potrzebna
nexis
post
Post #1





Grupa: Zarejestrowani
Postów: 1 012
Pomógł: 109
Dołączył: 26.09.2003
Skąd: nexis.pl

Ostrzeżenie: (0%)
-----


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]
Go to the top of the page
+Quote Post
FiDO
post
Post #2





Grupa: Przyjaciele php.pl
Postów: 1 717
Pomógł: 0
Dołączył: 12.06.2002
Skąd: Wolsztyn..... Studia: Zielona Góra

Ostrzeżenie: (0%)
-----


Temat niezgodny z regulaminem!
Pozatym byl on poruszany wiele razy, zamykam.
Poszukaj pod haslem "headers already sent"


--------------------
Brak czasu :/
Go to the top of the page
+Quote Post

Closed TopicStart new topic
1 Użytkowników czyta ten temat (1 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 19.08.2025 - 13:37