Updating post content on the front end

You should use the wp_update_post function.