By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,534 Members | 2,223 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,534 IT Pros & Developers. It's quick & easy.

Emptying $_POST?

P: n/a

I use a POST variable named "status" to show different screens while
keeping everything in the same script.

The problem is that in the Print screen, I need to empty this variable
so the user doesn't get FireFox's familiar ""The page you are trying
to view contains POSTDATA" if he hits F5/Refresh.

Neither unset() nor setting the variable to nothing works:

switch ($_POST['status']) {
//Main screen
echo "<form method=post><input type=submit name=status

case "Print":
//SELECT, etc.

//To avoid FireFox's "The page you are trying to view contains
POSTDATA" if user hits F5

//Doesn't work unset($_POST['status']);
//Doesn't work $_POST['status']="";

Is there a way to remove this variable or set it to nothing, so that
the user is redirected to default, main screen?

Thank you.
Feb 12 '08 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.