How to stop form resubmission on page refresh
Instead of … } else { echo “<p>Your file has been uploaded.</p>”; } … redirect to another address on success: } else { $new_url = add_query_arg( ‘success’, 1, get_permalink() ); wp_redirect( $new_url, 303 ); exit; } Status code 303 triggers a GET request: This method exists primarily to allow the output of a POST-activated script … Read more