I have a php file, and i know there is an error somewhere. When using this on my local machine with xampp it works fine, but when uploaded to a host, i get the header, and nav, then it says 'error getting', from the check connection part of my php code, and won't produce the table. the other pages work fine and submit to the data base so i assume the connect.php page is correct and its the code thats wrong. i have also been told by my lecture that it is the code, but i am struggling to find the problem
<?php
//uses the connect.php file to connect to the database
include('connect.php')
?>
<!DOCTYPE html>
<html>
<head>
<title>Extract data from DB </title>
<link rel="stylesheet" type="text/css" href="gcards.css">
</head>
<body>
<nav class="nav">
<h1>Gcards </h1>
<a href="get.php">Gcards</a>
<a href="insert.php">INSERT</a>
<a href="delete.php">DELETE</a>
</nav>
<?php
//query the database to extract relavent data
$get= "SELECT * FROM manufacturer
join
rating on manufacturer.manufacturerID = Rating.RatingID
join
model on manufacturer.manufacturerID = model.ModelID
join
ram on manufacturer.manufacturerID = ram.RamID
join
ram_type on manufacturer.manufacturerID = Ram_Type.Ram_TypeID
join
clock on manufacturer.manufacturerID = clock.ClockID";
// check connection
$data = mysqli_query($dbconnect, $get) or die('error getting');
echo "<table class=\"display\">";
echo "<tr><th>ID</th>
<th>Image_Url</th>
<th>Manufacturer</th>
<th>Series</th>
<th>Interface</th>
<th>Chipset</th>
<th>SLI-Cross Fire</th>
<th>Ram</th>
<th>Ram Type</th>
<th>Clock_Speed</th>
<th>Boost_Speed</th>
<th>OC_Speed</th></tr>";
while ($row = mysqli_fetch_array($data, MYSQLI_ASSOC)) {
echo "<tr>";
echo "</td><td>";
echo $row['ManufacturerID'];
echo "</td><td>";
?>
<img src ="<?php echo $row['Image_Url']; ?>"
height="100" width="125">
<?php
echo "<br>";
?>
<img src ="<?php echo $row['Rating']; ?>" width="125">
<?php
echo "</td><td>";
echo $row['Manufacturer'];
echo "</td><td>";
echo $row['Series'];
echo "</td><td>";
echo $row['Interface'];
echo "</td><td>";
echo $row['Chipset'];
echo"</td><td>";
echo $row['SLI_Crossfire'];
echo"</td><td>";
echo $row['RamNo'];
echo "</td><td>";
echo $row['Ram_Type'];
echo"</td><td>";
echo $row['Clock_Speed'];
echo"</td><td>";
echo $row['Boost_Speed'];
echo"</td><td>";
echo $row['OC_Speed'];
echo "</td></tr>";
echo "</table>";
}
?>
</body>
</html>