Emptying $_POST?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Gilles Ganault

    Emptying $_POST?

    Hello

    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']) {
    default:
    //Main screen
    echo "<form method=post><in put type=submit name=status
    value=Print></form>";
    break;

    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']="";
    break;
    }
    ==========

    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.
Working...