Try the following:
<?php
if (!empty($_POST)){
?>
<script type="text/javascript">
window.location = window.location.href;
</script>
<?php } ?>
I placed it in a prevent_resend.php file and then included it after postdata processing was complete.
include('prevent_resend.php');
source
share