public static function addFriend($id, $friend) { $mod = new Friend_Model(); $x = $mod->addFriend($id, $friend); if ($x) { header("Location:" . URL . "/friend/getFriends"); exit; } echo 'something went wrong'; die; }