i made lot of changes deleted white spaces but still on getting this error
Warning: Cannot modify header information - headers already sent by (output started at /home/supreme/www/www/freeoffer.php:9) in /home/super/www/www/freeoffer.php on line 44
please helpme.This is my file freeoffer.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta name="description" content="" />
<meta name="keywords" content="" />
<link href="favicon.ico" rel="shortcut icon"/>
<meta name="verify-v1" content="" />
<?php include("includes/meta.inc");?>
<?php include("includes/css.inc");?>
<?php include("includes/javascript.inc");?>
</head>
<?php
$code= $_POST['code'];
$myServer = "localhost:/tmp/mysql5.sock";
$myUser = "super";
$myPass = "195410";
$myDB = "super_phpDealerLocator";
$dbhandle = mysql_connect($myServer, $myUser, $myPass);
if(!$dbhandle)
{
die('Could not connect: ' . mysql_error());
}
//echo 'Connected successfully';
// connection to the database
$db = mysql_select_db($myDB, $dbhandle)or
die("Couldn't open database $myDB");
// select a database to work with
$query="SELECT *";
$query.="FROM `codeforfreebar`";
$query.="WHERE `m_code` LIKE '%$code'";
// //execute the SQL query and return records
$result = mysql_query($query,$dbhandle);
// display rows or products returned
$num_rows = mysql_num_rows($result);
if($num_rows==1)
{
header("Location: survey.php");
}
else
{
echo 'error on page';
}
?>
<body<?php include("includes/body_onload.inc"); ?>>
<div align="center">
<a name="top" rel="nofollow"></a>
<table width="780" border="0" cellspacing="0" cellpadding="0">
<tr>
<td valign="top" style="height:57px;">
<!-- -->
<table width="100%" border="0" cellspacing="0" cellpadding="0" style="height:57px;">
<tr>
<td style="width:292px;" valign="bottom"><a href="index.php" title="Supreme Protein Products"><img src="images/logo_top.jpg" alt="Supreme Protein" /></a></td>
<td style="width:100%;" valign="bottom">
<div align="right">
<?php include("includes/header_text.inc"); ?>
</div>
<br />
<?php include("includes/nav.inc"); ?></td>
</tr>
</table>
</td>
</tr>
<tr>
<td style="height: 51px;" valign="top" align="left">
<div class="float1"><img src="images/layout/bk-logo-bottom-revamp.jpg" alt="image" width="780" height="51" /></div>
<div class="float2">Protein Quality</div></td>
</tr>
<!-- to fix -->
<tr>
<td id="body" style="background-color:#FFFFFF; border-bottom-color:#000000; border-bottom-style:solid; border-bottom-width:1px; border-right-color:#000000; border-right-style:solid; border-right-width:1px; border-left-color:#000000; border-left-style:solid; border-left-width:1px; padding:20px;" valign="top" align="left">
<div align="center" id="mydiv" class="copy">
<form action="<?php echo $PHP_SELF;?>" method="POST">
<br/><br/>
<h3>Please enter the keycode: <input type="text" name="code" size="20" value="<?php echo $_POST
?>"></h3>
<br/>
<input type="submit" value="submit" name="submit">
</form>
</div>
</td>
</tr>
<tr>
<td valign="bottom">
<div>
<!-- BEGIN BOTTOM 3 -->
<?php include("includes/footer_images.inc"); ?>
<!-- END BOTTOM 3 -->
<?php include("includes/footer_text.inc"); ?></td>
</tr>
</table>
</div>
</body>
</html>