У мея возникла проблема с работой гостевой книги написанной на PHP.
При добавлении записи выдает следующую ошибку:
CODE:
Warning: Cannot modify header information - headers already sent by (output started at /home2/m/myx7.h12.ru/WWW/GuestBook/mnlxswgb.php:18) in /home2/m/myx7.h12.ru/WWW/GuestBook/mnlxswgb.php on line 213
Warning: Cannot modify header information - headers already sent by (output started at /home2/m/myx7.h12.ru/WWW/GuestBook/mnlxswgb.php:18) in /home2/m/myx7.h12.ru/WWW/GuestBook/mnlxswgb.php on line 217
Warning: Cannot modify header information - headers already sent by (output started at /home2/m/myx7.h12.ru/WWW/GuestBook/mnlxswgb.php:18) in /home2/m/myx7.h12.ru/WWW/GuestBook/mnlxswgb.php on line 222
Warning: Cannot modify header information - headers already sent by (output started at /home2/m/myx7.h12.ru/WWW/GuestBook/mnlxswgb.php:18) in /home2/m/myx7.h12.ru/WWW/GuestBook/mnlxswgb.php on line 226
Warning: Cannot modify header information - headers already sent by (output started at /home2/m/myx7.h12.ru/WWW/GuestBook/mnlxswgb.php:18) in /home2/m/myx7.h12.ru/WWW/GuestBook/mnlxswgb.php on line 217
Warning: Cannot modify header information - headers already sent by (output started at /home2/m/myx7.h12.ru/WWW/GuestBook/mnlxswgb.php:18) in /home2/m/myx7.h12.ru/WWW/GuestBook/mnlxswgb.php on line 222
Warning: Cannot modify header information - headers already sent by (output started at /home2/m/myx7.h12.ru/WWW/GuestBook/mnlxswgb.php:18) in /home2/m/myx7.h12.ru/WWW/GuestBook/mnlxswgb.php on line 226
Посмотрел в скрипте по данным линиям код такой:
PHP:
include ("config.inc.php");
if ($add == "$add_b")
{
if (isset($name) and $name != "" or $name == "")
{
setcookie("c_name",$name,time()+33333333); строка 213
}
if (isset($city) and $city != "" or $city == "")
{
setcookie("c_city",$city,time()+33333333); строка 217
}
if (isset($homepage) and $homepage != "" or $homepage == "")
{
$homepage = str_replace("http://","",$homepage);
setcookie("c_homepage",$homepage,time()+3333333); строка 222
}
if (isset($mail) and $mail != "" or $mail == "")
{
setcookie("c_mail",$mail,time()+33333333); строка 226
}
}
if ($add != "$add_b")
{
if (isset($name) or $name == "")
{
$name = $c_name;
}
if (isset($city) or $city == "")
{
$city = $c_city;
}
include ("config.inc.php");
if ($add == "$add_b")
{
if (isset($name) and $name != "" or $name == "")
{
setcookie("c_name",$name,time()+33333333); строка 213
}
if (isset($city) and $city != "" or $city == "")
{
setcookie("c_city",$city,time()+33333333); строка 217
}
if (isset($homepage) and $homepage != "" or $homepage == "")
{
$homepage = str_replace("http://","",$homepage);
setcookie("c_homepage",$homepage,time()+3333333); строка 222
}
if (isset($mail) and $mail != "" or $mail == "")
{
setcookie("c_mail",$mail,time()+33333333); строка 226
}
}
if ($add != "$add_b")
{
if (isset($name) or $name == "")
{
$name = $c_name;
}
if (isset($city) or $city == "")
{
$city = $c_city;
}
посмотреть можно здесь