connect_error) {
die("Connection failed: " . $conn->connect_error);
}
$sql = "SELECT name, email, message FROM tickets";
$result = $conn->query($sql);
if ($result->num_rows > 0) {
echo "ID Name ";
// output data of each row
while($row = $result->fetch_assoc()) {
echo "".$row["name"]." ".$row["email"]." ".$row["message"]." ";
}
echo "
";
} else {
echo "0 results";
}
$conn->close();
?>