changed to PDO db connection, fixed errors.