soulblader_86
Supremacy Member
- Joined
- Sep 28, 2007
- Messages
- 9,012
- Reaction score
- 0
Cannot modify header information - headers already sent by (output started at D:\xampp\htdocs\xampp\crm\sidebar.php:73) in D:\xampp\htdocs\xampp\crm\confirmCustomer.php on line 120
This is my side bar PHP
It happen when I add customer from customer page
this is my sidebar php
this is my confirmcustomer.php
what does header mean?
This is my side bar PHP
It happen when I add customer from customer page
this is my sidebar php
PHP:
<?php include('config.php') ?>
<link rel="stylesheet" type="text/css" href="style.css"/>
<div id = "sandy">
<p class = "searchbox">
<input class="search" placeholder="Search Company" />
</p>
<ul class="list">
<?php
$qry = "SELECT * FROM customer order by DateCreated DESC";
$result = mysql_query($qry);
$num = mysql_num_rows($result);
if($num >=1)
{
while($row = mysql_fetch_array($result))
{?>
<li>
<a class="search" href="customer.php?id=<?php echo $row["CustomerID"]?>"><span class="name"><?php echo $row["CompanyName"]?></span></a>
</li>
<?php
}
}
?>
</ul>
</div>
<!-- Start of List.js stuff -->
<script src="list.js"></script>
<script type="text/javascript">
/*
* LOVELY THINGS
*/
var options = {
valueNames: [ 'name' ]
};
var featureList = new List('sandy', options);
$('#filter-games').click(function() {
featureList.filter(function(item) {
if (item.values().category == "Game") {
return true;
} else {
return false;
}
});
return false;
});
$('#filter-beverages').click(function() {
featureList.filter(function(item) {
if (item.values().category == "Beverage") {
return true;
} else {
return false;
}
});
return false;
});
$('#filter-none').click(function() {
featureList.filter();
return false;
});
</script>
<!-- End of List.js stuff -->
this is my confirmcustomer.php
PHP:
<!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" />
<title>Untitled Document</title>
<link rel="stylesheet" href="http://code.jquery.com/ui/1.10.2/themes/smoothness/jquery-ui.css" />
<script src="http://code.jquery.com/jquery-1.9.1.js"></script>
<script src="http://code.jquery.com/ui/1.10.2/jquery-ui.js"></script>
<script>
$(function() {
$( "#tabs" ).tabs();
});
</script>
<link rel="stylesheet" type="text/css" href="style.css" />
</head>
<body><div id="main_container">
<table width="980" border="1" id="main_table" cellpadding="5" cellspacing="5">
<tr>
<td colspan="2" height="100"><?php include('header.php') ;?></td>
</tr>
<tr>
<td width="200" height="300" valign="top" id="sidebar"><?php include('sidebar.php') ;?></td>
<td width="696" valign="top" id="width">
<!-- Start of content -->
<?php
if (!empty($_FILES["file"]["name"]))
{
$filename = $_FILES["file"]["name"];
$allowedExts = array("gif", "jpeg", "jpg", "png");
$extension = substr ($filename, strpos($filename, '.')+ 1);
if ((($_FILES["file"]["type"] == "image/gif")
|| ($_FILES["file"]["type"] == "image/jpeg")
|| ($_FILES["file"]["type"] == "image/jpg")
|| ($_FILES["file"]["type"] == "image/pjpeg")
|| ($_FILES["file"]["type"] == "image/x-png")
|| ($_FILES["file"]["type"] == "image/png"))
&& ($_FILES["file"]["size"] < 2097152)
&& in_array($extension, $allowedExts))
{
if ($_FILES["file"]["error"] > 0)
{
echo "Return Code: " . $_FILES["file"]["error"] . "<br>";
?>
<br>
<a href="addCustomer.php"><img src="images/back1.png" width="42" height="41" /></a>
<?php
die();
}
else
{
move_uploaded_file($_FILES["file"]["tmp_name"],
"images/" . $_FILES["file"]["name"]);
}
}
else
{
echo "Invalid image file";
?>
<br>
<a href="addCustomer.php"><img src="images/back1.png" width="42" height="41" /></a>
<?php
die();
}
}
$image = "images/" . $_FILES["file"]["name"];
$name =$_POST["name"];
$address=$_POST["address"];
$industry = $_POST["industry"];
$employees = $_POST["employees"];
$netprofit= $_POST["netprofit"];
$industry= $_POST["industry"];
$contact = $_POST["contact"];
$turnover = $_POST["turnover"];
$createdBy = $_POST["createdby"];
$website = $_POST["website"];
$date = $_POST["date"];
$qry = "Select * FROM Customer Where CompanyName='$name'";
$result = mysql_query($qry);
$num = mysql_num_rows($result);
if($num >=1)
{
echo "Company was previously added in the database";
}
else
{
mysql_query("INSERT into customer(OfficeNumber,CompanyName,Turnover,NetProfit,Industry, Employees, Address, Image, CreatedBy, DateCreated, Website)values ('$contact', '$name' , '$turnover', '$netprofit', '$industry', '$employees', '$address','$image','$createdBy','$date','$website')");
$qry = "select * from customer where CompanyName = '$name'";
$result = mysql_query($qry);
$num = mysql_num_rows($result);
if($num >=1)
{
header("Location: customer.php?add=1");
}
else
{
// header("Location: customer.php?add=0");
}
?>
<br>
<a href="addCustomer.php"><img src="images/back1.png" width="42" height="41" /></a>
<?php
}
?>
<!-- End of Content -->
</td>
</tr>
<tr>
<td colspan="2" height="20"><?php include('footer.php') ;?></td>
</tr>
</table>
</div>
</body>
</html>
what does header mean?