session_start(); session_regenerate_id(false); require_once "reqs/common.php"; require_once "reqs/pdo.php"; require_once "reqs/auth.php"; checkLoggedIn(); $updata = array(); $user = $_SESSION["user"]; $projectID = param($_POST, 'projectID', ''); if (empty($projectID)) { errormsg("The 'projectID' is required."); } $dbh = new PDB(); $db = $dbh->db; $site = new Site($db); $tasks = $dbh->getTasks($projectID); $taskArr = array(); for ($i = 0; $i < count($tasks); $i++) { array_push($taskArr, $tasks[$i]->id); } $arr = implode(", ", $taskArr); try { $ct = 0; if (!empty($arr)) { //rich and justin edit $sql = "DELETE FROM tasks WHERE id IN (" . $arr . ")"; //errormsg($arr); $st = $db->prepare($sql); $st->execute(); } } catch (PDOException $e) {