Possible Duplicate:
PHP error: Cannot modify header information – headers already sent
“Warning: Headers already sent” in PHP
I many times used header('location:index.php')..but each time it give me error like " Cannot modify header information - headers already sent by"..plz anybody help me....
<?PHP
$exist=mysql_query("select * from lease where pro_id='".$pro_id."'")
or die(mysql_error());
if(mysql_num_rows($exist)>0){header('location:leaseexist.php');} ?>
UPDATE
the error is
Warning: Cannot modify header information - headers already sent by (output started at
/home/content/39/9845539/html/slwebsite/leaseprofile.php:15) in /home/content/39/9845539/html/slwebsite/leaseprofile.php on line 19
and line 19 is
if(mysql_num_rows($exist)>0){header('location:leaseexist.php');}