I have a webpage that was working yesterday. It is a very basic page that has a very simple php table in it. However i attempted to add another column today and now the page won't load it doesn't even show the code when i inspect the element of the webpage. It will display when I rename the index.php to index.html but then of course the php table doesn't work. Any help would be appreciated. Also I tried a different index.php page and it worked
Here is my php:
<?php
$servername = "ip";
$username = "username";
$password = "password";
$dbname = "Prices";
// Create connection
$conn = new mysqli($servername, $username, $password, $dbname);
// Check connection
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
$sql = "SELECT * FROM `prices` ORDER BY `prices`.`Name` ASC";
$result = $conn->query($sql);
if ($result->num_rows > 0) {
echo "<table><tr><th>Name</th><th>Price In $||</th><th>Price in Ref</th><th>Quantity</th></tr>";
// output data of each row
while($row = $result->fetch_assoc()) {
echo "<tr><td>" . $row["Name"]. "</td><td>" . $row["Price"]. "</td><td>" . $row["Price_in_Metal"]. "</td><td>" . $row ["Quantity"]"</td></tr>";
}
echo "</table>";
} else {
echo "0 results";
}
$conn->close();
?>