So here is my code:
$sql = "SELECT * FROM `items`";
$result = mysqli_query($conn, $sql);
while($prommes = mysql_fetch_array($result)){
}
When I'm running it. I'm getting this error:
mysql_fetch_array() expects parameter 1 to be resource.
Is it something wrong with my database?
And here is my connection which Irequire in the html document. Can it be something here which makes the query not working?
$servername = "localhost";
$username = "root";
$password = "";
// Create connection
$conn = mysqli_connect($servername, $username, $password);
// Check connection
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
// echo "Connected successfully";