public function action_create() { RoutingEngine::setPage("runnDAILY", "PV__300"); $goal = new Goal($_POST); if ($goal->createGoal()) { Goal::updatePercentForList(array(0 => array("go_id" => $goal->id))); Page::redirect("/goals/view/{$goal->id}"); } else { Page::redirect("/goals"); } }