i mam pewien problem
Podczas dodawania oceny wysietla mi sie pewien komunikat:
Kod
case 'ocena':{
if($HTTP_COOKIE_VARS["ocena".$id.""] == $id)
{
}
else
{
$Query='SELECT * FROM '.DB_PREFIX.'films ORDER BY id='.$id;
$result = $db->query($Query) or die(mysql_error());
while ($row = mysql_fetch_array($result))
{
$ile=$row["ile"];
$ile++;
$glosy=$row["razem"] + $_POST["ocena"];
$ocena=substr($glosy / $ile, 0,3);
$ocena1=$ocena;
}
$query="UPDATE ".DB_PREFIX."films SET zaglosowalo='".$ile."', razem='".$glosy."', ocena='".$ocena1."' WHERE id='".$id."'";
$db->query($query);
mysql_close();
setcookie("ocena".$id."", $id , time()+86400);
}
header('Location: film-'.$id.'');
}
break;
if($HTTP_COOKIE_VARS["ocena".$id.""] == $id)
{
}
else
{
$Query='SELECT * FROM '.DB_PREFIX.'films ORDER BY id='.$id;
$result = $db->query($Query) or die(mysql_error());
while ($row = mysql_fetch_array($result))
{
$ile=$row["ile"];
$ile++;
$glosy=$row["razem"] + $_POST["ocena"];
$ocena=substr($glosy / $ile, 0,3);
$ocena1=$ocena;
}
$query="UPDATE ".DB_PREFIX."films SET zaglosowalo='".$ile."', razem='".$glosy."', ocena='".$ocena1."' WHERE id='".$id."'";
$db->query($query);
mysql_close();
setcookie("ocena".$id."", $id , time()+86400);
}
header('Location: film-'.$id.'');
}
break;
o to komunikat:
Kod
[size="2"][b]Warning[/b]: Cannot modify header information - headers already sent by (output started at /includes/functions.php:386) in [b]/includes/functions.php[/b] on line [b]229[/b]
[b]Warning[/b]: Cannot modify header information - headers already sent by (output started at /includes/functions.php:386) in [b]/includes/functions.php[/b] on line [b]231[/b][/size]
[b]Warning[/b]: Cannot modify header information - headers already sent by (output started at /includes/functions.php:386) in [b]/includes/functions.php[/b] on line [b]231[/b][/size]
Za pomoc dziekuje