public function addList() { try { $db = new DB(); $list = new TList($_POST["name"], $_POST["description"], $_GET["board"]); $sql = "INSERT INTO list(name,description,board_id) VALUES (:name,:description,:board_id)"; $q = $db->getConnection()->prepare($sql); $q->execute(array(':name' => $list->getName(), ':description' => $list->getDescription(), ':board_id' => $list->getBoardId())); } catch (PDOException $e) { echo $e->getMessage(); } }