It does straight to 0 results found on my website instead of doing the echo $row any ideas? I want it to pull from my database(phpmyadmin) the database name is events_table on it.
<?php
$servername = "localhost";
$dbname = "events_table";
$conn = new mysqli($servername, $dbname);
$sql = "SELECT ID, Title, Description, Month FROM
'events_table'";
$result = $conn->query($sql);
if (!$conn) {
die("Connection failed: " . mysqli_connect_error());
}
if ($result = $conn->query($sql)){
echo "query success";
while($row = $result->fetch_assoc()) {
echo $row["ID"], $row["Title"], $row["Description"] ;
}
}
else {
echo "0 Results";
}
$conn->close();
?>