Ik ben nog niet echt goed met PHP, zou iemand mij willen vertellen waarom er komt te staan:

Warning: Cannot modify header information - headers already sent by

Ik heb hier het script:

<? include("include.php") ?><head><STYLE TYPE="text/css">

td{
font-size:9pt;
}

body{
background:#000000;
color:#FFFFFF;
font-size:8pt;
font-family:verdana;
}

A: Link {font-family:Verdana;color:#FFFFFF;font-size:9pt;font-weight:normal;font-style:normal;background:#000000;text-decoration:none;}
A: Active {font-family:Verdana;color:#FFFFFF;font-size:9pt;font-weight:normal;font-style:normal;background:#000000;text-decoration:none;}
A: Hover {font-family:Verdana;color:#FFFFFF;font-size:9pt;font-weight:normal;font-style:normal;background:#000000;text-decoration:none;}
A: Visited {font-family:Verdana;color:#FFFFFF;font-size:9pt;font-weight:normal;font-style:normal;background:#000000;text-decoration:none;}
</STYLE></head>
<?
$eurosplit = explode(".", $pdaprijs);
$euro = $eurosplit[0];
if ($eurosplit[1] == "") {
$euro .= ",-";
} elseif ($eurosplit[1] >= 9) {
$euro .= ",$eurosplit[1]";
} else {
$euro .= ",$eurosplit[1]0";
}
?><?
mysql_query("delete FROM kopers WHERE FROM_UNIXTIME(time,'%d') != FROM_UNIXTIME(unix_timestamp(),'%d')");
if ($_GET[id] == "") { header("location:http://www.probeerweb.nl";); exit; }



head();


$result = mysql_query("select * from kopers where ip='$_SERVER[REMOTE_ADDR]' AND verkoperid='$_GET[id]'") or die(mysql_error());
if ($row=mysql_fetch_array($result)) {
echo "Je hebt vandaag al geklikt!";
} else {
$result = mysql_query("select * from users where id=$_GET[id]");
if ($row = mysql_fetch_array($result)) {

if ($row[ref] != 0) {
$query = "UPDATE users SET refglaasjes=refglaasjes+1, euro=euro+$refprijs WHERE id=$row[ref]";
mysql_query($query);
}

mysql_query("UPDATE users SET glaasjes=glaasjes+1, euro=euro+$pdaprijs WHERE id=$_GET[id]") or die(mysql_error());
mysql_query("INSERT INTO kopers (ip, time, verkoperid) VALUES ('$_SERVER[REMOTE_ADDR]', UNIX_TIMESTAMP(), $_GET[id])");

// VOLGENS MIJ LIGT HET HIER AAN:
header("Location: klik.php");
} else {
echo "Uw klik is niet verwerkt";
}
}


foot();
?>
Je mag nix echo'en, naar de browser sturen, voor je header functie.
Output buffering kan dit wel oplossen ..
wat moet ik dus nu doen?
dit:

<?
$eurosplit = explode(".", $pdaprijs);
$euro = $eurosplit[0];
if ($eurosplit[1] == "") {
$euro .= ",-";
} elseif ($eurosplit[1] >= 9) {
$euro .= ",$eurosplit[1]";
} else {
$euro .= ",$eurosplit[1]0";
}
?><?
mysql_query("delete FROM kopers WHERE FROM_UNIXTIME(time,'%d') != FROM_UNIXTIME(unix_timestamp(),'%d')");
if ($_GET[id] == "") { header("location:http://www.probeerweb.nl";); exit; }
?>

bovenaan je pagina zetten ;)

Reageren