try { $db = new PDO(\"mysql:host=\".HOST.\";dbname=\".DB, USER, PW); $st = $db->prepare(\"SELECT * FROM c6ode\"); } catch (PDOException $e){ echo $e-&
I'm guessing that your complaint is that the exception is not firing. PDO is most likely configured to not throw exceptions. Enable them with this:
$db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);