To debug the form data, print it after form submission.
echo "<pre>"; print_r($_POST); echo "</pre>";