I've got a little bit of a problem when I try to run this code. I receive this error:
Warning: mysqli_fetch_array() expects parameter 1 to be mysqli_result, object given in
My problem is in the while
statement on line 32:
$connection = mysqli_connect($host, $username, $password, $db_name);
$sql = 'SELECT * FROM provinsi';
while ($r = mysqli_fetch_array($connection, $sql)) { // line 32
$id = $r['id'];
}