Why am i getting this error:

Warning: mysqli_fetch_assoc() expects parameter 1 to be mysqli_result, boolean given in /Users/Joli/Sites/TestSite/index.php on line 47

$conn = mysqli_connect("localhost","sql","password","db") or die("Query died: Connect");
$checkSql="select count(id) as eCount from address";
$result = mysqli_query($conn,$checkSql);
$row = mysqli_fetch_assoc($result);
if($row['eCount'] == 6){
$disable = 1;
}

it means your query failed. use mysqli_error to figure out what went wrong.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.