I have buy.php with the form where you enter items, quantity, delivery details, etc.
When you click the Submit button, it returns to buy.php ($_SERVER['PHP_SELF']) and does some data validation.
If there are no fields or errors, they are highlighted. If everything is correct, I save the $_POST data in the $_SESSION variables, then do header('Location: check.php') , where I display the data so that the buyer can verify the information for the last time before the actual purchase.
Now, if I am in check.php and click the back button on buy.php so that I can change the material, the browser asks if I want to resend the POST data. I am trying to avoid this.
Anyone have any good advice or good practice for multivariate PHP validation?
Also, if I had n pages to fill out by the user, buy.php, buy2.php, ... buyn.php before check.php did the same ideas persist?
source share