In PHP, what are the best practices for handling form submissions and displaying success messages without page refresh?

When handling form submissions in PHP and displaying success messages without page refresh, one common approach is to use AJAX. This allows for asynchronous communication with the server, updating the page content without requiring a full page reload. By using AJAX, you can submit the form data in the background, process it on the server side, and return a success message to be displayed on the page without disrupting the user experience.

```php
// HTML form with AJAX submission
<form id="myForm">
  <input type="text" name="name">
  <input type="email" name="email">
  <button type="submit" id="submitForm">Submit</button>
</form>

<div id="successMessage"></div>

<script>
  document.getElementById('myForm').addEventListener('submit', function(e) {
    e.preventDefault();
    
    var formData = new FormData(this);
    
    fetch('process_form.php', {
      method: 'POST',
      body: formData
    })
    .then(response => response.json())
    .then(data => {
      document.getElementById('successMessage').innerText = data.message;
    });
  });
</script>
```

In the above code snippet, we have an HTML form that is submitted using AJAX when the submit button is clicked. The form data is sent to a PHP script (process_form.php) for processing. Once the server processes the form data, it returns a JSON response with a success message that is then displayed on the page without refreshing.