mysqli_fetch_row() expects parameter 1 to be mysqli_result, code example
Example: mysqli_fetch_row() expects parameter 1 to be mysqli_result, boolean given in
change that if statment to
if(!$result) {
change that if statment to
if(!$result) {