I have the following code. The mysqli_insert_id() (in this case \"$last_row\"), which is supposed to return the last row of the table, is always returning 0. Why is it so?>
To get the result, you should place the
$last_row = mysqli_insert_id($connection);
after your INSERT query