Plugin Form Submission Best Practice
Send the form action either to your homepage, or to a specific page URL. You can’t have
$_POST handling within the template because you need to redirect after your process it, and redirect needs to be fired before any HTML output.
// you should choose the appropriate tag here
// template_redirect is fired just before any html output
// see - http://codex.wordpress.org/Plugin_API/Action_Reference
if(isset($_POST['event'])) // && (get_query_var('pagename') === 'events)
// process your data here, you'll use wp_insert_post() I assume
wp_redirect($_POST['redirect_url']); // add a hidden input with get_permalink()
If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.