condensed the blog post submit and redirect to one function on submit