Warning: mysqli_fetch_array() expects parameter 1 to be mysqli_result, boolean given in C:\xampp\

i get this error when calling my index page.
<?php error_reporting(-1); include("header.php"); include("mysqli.php"); $result = mysqli_query($con,"SELECT * FROM profile ORDER BY RAND() "); if(isset($_SESSION["logid"])) { header("Location: profile.php"); } $i=0; if ($row = mysqli_fetch_array($result)) { $img[$i] = $row["image"]; $uid[$i] = $row["userid"]; $i++; } else{ mysqli_connect_error(); } ?>


  • That means your mysqli_query() returned an error.

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


In this Discussion