So I've just been doing this using die. I don't really want to print out mysql and php errors on the page for the user to see... maybe send the error to a log file? How to handle the rest of the page if a mysqli_query fails for some reason?
if(!mysqli_query($db, $q))
die();
Thanks.