Hi,
I'm currently stuck and can not work it out.
<b>Warning</b>: Cannot modify header information - headers already sent by (output started at /home/REMOVED/public_html/REMOVED/track/lead.php:6) in <b>/home/REMOVED/public_html/REMOVED/track/lead.php</b> on line <b>38</b><br />
<br />
<b>Warning</b>: Cannot modify header information - headers already sent by (output started at /home/REMOVED/public_html/REMOVED/track/lead.php:6) in <b>/home/REMOVED/public_html/REMOVED/track/lead.php</b> on line <b>39</b><br />
<br />
<b>Warning</b>: Cannot modify header information - headers already sent by (output started at /home/REMOVED/public_html/REMOVED/track/lead.php:6) in <b>/home/REMOVED/public_html/REMOVED/track/lead.php</b> on line <b>40</b><br />
<iframe src="Array" frameborder="0" height="0" width="0">
Why am i getting this error?
Below is my PHP code:
<?php
// Print a cookie
//echo $_COOKIE["user"];
// A way to view all cookies
//print_r($_COOKIE);
$username="REMOVED";
$password="REMOVED";
$database="REMOVED";
$affid=$_COOKIE["adwarm_lead_affid"];
$subid=$_COOKIE["adwarm_lead_subid"];
$click=$_COOKIE["adwarm_click"];
$leadip=@$REMOTE_ADDR;
$referer=$_SERVER['HTTP_REFERER'];
$status="Pending";
$p=$_GET["p"];
$adid=$_GET["adid"];
mysql_connect(localhost,$username,$password);
@mysql_select_db($database) or die( "Oops theres an error, our highly trained monkeys have been notified.");
$query="INSERT INTO affleads VALUES ('','$p','$affid','$subid','$adid','$click','$leadip','$status','$referer')";
mysql_query($query) or dies(mysql_error());
mysql_close();
mysql_connect(localhost,$username,$password);
@mysql_select_db($database) or die( "Oops theres an error, our highly trained monkeys have been notified.");
$query2="SELECT Pixel FROM affpixels WHERE AffID ='$affid'";
mysql_query($query2) or dies(mysql_error());
$result2 = mysql_query($query2);
$pixelurl=mysql_fetch_array($result2, MYSQL_ASSOC);
mysql_close();
setcookie("adwarm_lead_subid", "",1);
setcookie("adwarm_lead_clickid", "",1);
setcookie("adwarm_click", "",1);
?>
<iframe src="<? echo $pixelurl; ?>" frameborder="0" height="0" width="0">
The errors are reporting to the following 3 lines:
setcookie("adwarm_lead_subid", "",1);
setcookie("adwarm_lead_clickid", "",1);
setcookie("adwarm_click", "",1);
Any help would be great.
Thanks