add($args) ) { Alert::set('Post added successfuly'); Redirect::page('admin', 'manage-posts'); } else { Alert::set('Error occurred when trying to create the post'); } } if( $_SERVER['REQUEST_METHOD'] == 'POST' ) { addPost($_POST); }