mysqli_fetch_array() expects parameter 1 to be mysqli_result boolean given - warning
I have this error mysqli_fetch_array() expects parameter 1 to be mysqli_result boolean given - how to solve it?
Example 1: IN operator Syntax
I've read it has something to do with my query being wrong, but it has worked on my hosting provider so that can't be it!
<?php
$sql="SELECT * FROM customers WHERE id=".$id."";
$result = mysql_query($sql);
while($row = mysql_fetch_array($result)) {
$first_name = $row["first_name"];
$last_name = $row["last_name"];
$email = $row["email"];
$password = $row["password"];
echo "id: " . $row["id"]. " - Name: " . $row["first_name"]. " " . $row["last_name"]. "<br>";
}
?>
$sql="SELECT * FROM customers WHERE id=".$id."";
$result = mysql_query($sql);
while($row = mysql_fetch_array($result)) {
$first_name = $row["first_name"];
$last_name = $row["last_name"];
$email = $row["email"];
$password = $row["password"];
echo "id: " . $row["id"]. " - Name: " . $row["first_name"]. " " . $row["last_name"]. "<br>";
}
?>
mysqli_fetch_array
Mysqli_fetch_array() expects parameter 1 to be mysqli_result boolean given - php mysqli
Online Editor
This tool makes it easy to create, adjust, and experiment with custom colors for the web.
HTML Templates

Magnews2 is a modern and creative free magazine and news website template that will help you kick off your online project in style.
CSS HTML Layout

Find here examples of creative and unique website layouts.
Free CSS HTML Menu

Find here examples of creative and unique website CSS HTML menu.