Home / PHP Tips Generated By ChatGPT / Preventing Form Resubmission on Page Refresh in PHP Redirect after a form submission to prevent resubmission. Source Code if ($_SERVER['REQUEST_METHOD'] == 'POST') { // Process form header("Location: ".$_SERVER['PHP_SELF']); exit; }