DesignerBill
Member
I've started to have an odd problem with PHP. I have a PHP page that can be submitted in three different ways to determine what data base processing will occur:
1. By just entering the URL in the browser address, or refreshing, with no query string (should set no $_POST or $_GET variables).
2. By entering the URL with a query string (should set $_GET variables only).
3. By clicking a Submit button in one of two forms on the page with "action=page url" and "method=post" (should set $_POST variables from form only).
What's happening is that after I invoke the page using method 3 and update the data base, then refresh the page which should imply method 1, the previous $_POST variables are kept, and $_SERVER["REQUEST_METHOD"] is still set to "POST".
Is there a way to correct this so all $_GET or $_POST variables are cleared when I refresh the page?
1. By just entering the URL in the browser address, or refreshing, with no query string (should set no $_POST or $_GET variables).
2. By entering the URL with a query string (should set $_GET variables only).
3. By clicking a Submit button in one of two forms on the page with "action=page url" and "method=post" (should set $_POST variables from form only).
What's happening is that after I invoke the page using method 3 and update the data base, then refresh the page which should imply method 1, the previous $_POST variables are kept, and $_SERVER["REQUEST_METHOD"] is still set to "POST".
Is there a way to correct this so all $_GET or $_POST variables are cleared when I refresh the page?