How can the issue of page reloads causing the index page to be displayed be resolved in PHP?

Issue: The problem of page reloads causing the index page to be displayed can be resolved by using the Post/Redirect/Get (PRG) pattern in PHP. This pattern involves processing form submissions, then redirecting to a different URL to prevent form resubmission on page refresh.

```php
// Check if form is submitted
if ($_SERVER["REQUEST_METHOD"] == "POST") {
    // Process form data
    // Redirect to a different URL
    header("Location: success.php");
    exit();
}
```
In this code snippet, we check if the form is submitted using the `$_SERVER["REQUEST_METHOD"]` variable. If the form is submitted, we process the form data and then redirect to a different URL using `header("Location: success.php")`. This prevents the index page from being displayed on page reloads.