When using $PHP_SELF, GET variables are not captured. Is there another variable that will capture GET variables?
Also, I have a user submission on each of my web pages. The forms all have their actions set to whatever page the user is on. Currently the processing of each submission is stuck into a file that's included on every page, but this leads to problems. For the user, the "Repost form data" dialog box that pops up when they try to refresh the page is annoying, and leads to spam. There are a couple other problems as well.
So I decided to stick the submission processing into a separate file that is called by the form itself. After performing the database inserts, updates, etc., I would do use the header(Location: ...) to have the user land up on the original page he/she submitted from. I did not use a META refresh because I personally find the forums annoying where you must wait to be redirected after submitting.
However, I DO want to give the user a message that his submission was processed correctly, etc. This message would have to be passed from the process page to the actual page the user submitted from. Using POST would defeat a main reason for me changing my submission method. But using GET to pass strings also poses problems, mostly aesthetical (i.e. the whole message is displayed in the address bar), as well as some functional problems (the user could change the string in the address bar and end up with a different unintended message on the page).
Is there a way to "encode" the string so the address bar is cleaner and cannot be easily modified by the user?