Could someone point out what is wrong with this code, or at least explain how to get any error messages out of this? I don't know how to trouble shoot farther then this.
try {
$db = new PDO($dbhost, $dbuser, $dbpassword);
$sql = "INSERT INTO reports (Type, Location, Urgency, Description, Suggestion, Confidential, Email, Date, Time, Status, Link, ID, Title, Dopen) VALUES ('$type','$location','$urgency','$description','$solution','$confidential','$name','$date', '$time','Open','$link','$id', '$title','$date2')";
$sth = $db->query($sql);}
catch(PDOException $e) {echo $e->getMessage();}