I've been getting this error after I insert the require_once('login.php')
I've checked both files and I don't have any empty lines after the php closing tags as is usually the case with this error
This is the code
<html>
<head>
<title>Home</title>
</head>
<body>
<link rel="stylesheet" type="text/css" href="style.css"/>
<?php
require_once('login.php');
require_once('appvars.php');
require_once('header.php');
$dbc = mysqli_connect(DB_HOST, DB_USER, DB_PASSWORD,DB_NAME)
or die('Error connecting to the MySQL server');
$query = "SELECT * FROM products";
$result = mysqli_query($dbc, $query)
or die('Error querying database.');
echo '<table BORDER = 1 Width=50% height=50% align="center">';
while ($row = mysqli_fetch_array($result)) {
$productname = $row['wineName'];
$productdesc = $row['description'];
$productprice = $row['price'];
$imagefilename = $row['picturefilename'];
$fullimagepath = UPLOAD_PATH.$imagefilename;
echo '<tr>';
echo '<td class= "productname">';
echo $productname;
echo '</td>';
echo '<td class = "productdesc">';
echo $productdesc;
echo '</td>';
echo '<td class = "price">';
echo $productprice;
echo '</td>';
echo '<td>';
echo "<img src = '$fullimagepath' />";
echo '</td>';
echo '</tr>';
}
echo '</table>';
require_once('Footer.php');
?>
</body>
</html>
And this is the warning I keep getting
Warning: Cannot modify header information - headers already sent by (output started at F:\PCH\xampp-win32-1.7.2\xampp\htdocs\Alfred\Index.php:7) in F:\PCH\xampp-win32-1.7.2\xampp\htdocs\Alfred\login.php on line 5
Can anyone help me with this please?