I have been getting the following error when I uploaded to a live server. It works OK on localhost which I thought was strange.
Fatal error: Call to a
You should put $stmt into you if clause. There is a possiblity that if (false) and still get to your $stmt->close();
$stmt
$stmt->close();