Okay I have a piece of code that for some reason gives me the following error.
Warning: mysqli_fetch_array() expects parameter 1 to be mysqli_result, boolean given in
Here is the code.
$mysqli = new mysqli("localhost", "root", "", "sitename");
$dbc = mysqli_query($mysqli,"SELECT * FROM sitename WHERE id='$user_id'");
while($row = mysqli_fetch_array($dbc)){
$state = $row["state"];
$city = $row["city"];
$zip = $row["zip"];
$bio_body = $row["bio_body"];
}
If you can please help me by giving me the correct code.