Basic PHP MVC setup for form submissions
Templates

Your HTML code should be separated out into a template file. You should do your best to avoid mixing HTML into your PHP, as your HTML will inevitably grow, and your PHP will get messier as a result. 

Post/Get/Redirect

The pattern you are looking for is Post/Get/Redirect. You should always follow this pattern. When a user submits a form using POST, you should process the form, and then if it was successful, redirect them back to some page (possibly the form page again) with an added URL parameter.

E.g. http://example.com/contact-us?submitted=true

Then in your form code, you can check if the URL parameter is present, and show a success message.