title = $_POST['title']; $post->description = $_POST['description']; //Call the save function. if($post->save()) echo json_encode(array($post->id, $post->created_at)); }