Fatal error: Call to a member function close() on a non-object. MySQLi issue

You should put $stmt into you if clause. There is a possiblity that if (false) and still get to your $stmt->close();

Leave a Comment