Answers for "how to clear post array on referesh + not refill when return"

PHP
0

how to clear post array on referesh + not refill when return

if (!isset($_SESSION)) {
session_start();
}

if ($_SERVER['REQUEST_METHOD'] == 'POST') {
$_SESSION['postdata'] = $_POST;
unset($_POST);
header("Location: ".$_SERVER[REQUEST_URI]);
exit;
}

if (@$_SESSION['postdata']){
$_POST=$_SESSION['postdata'];
unset($_SESSION['postdata']);
}
Posted by: Guest on May-22-2021

Code answers related to "how to clear post array on referesh + not refill when return"

Browse Popular Code Answers by Language