I'm new to developing with WordPress. I read here that a good way to process data posted from forms is to insert an action on the init function like so:
add_action( 'init', 'contact_form_send_email' );
My function seems to be processing the data correctly, but I can't figure out how to make a variable available within the same template that has the form.
What is the way to do this? I've heard that setting global variables is not a good way to go.