Have you ever refreshed a page after submitting a form and seen the browser warn "Confirm Form Resubmission"? To prevent duplicate orders or comments, always use the Post-Redirect-Get (PRG) pattern: process the POST, store a flash message in $_SESSION, send header("Location: ..."), and call exit; immediately.
ADVERTISEMENT