Search
 
SCRIPT & CODE EXAMPLE
 

PHP

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']);
}
Comment

PREVIOUS NEXT
Code Example
Php :: supprimer un cookie avec un input en php 
Php :: magento 2 get layout create block with cache 
Php :: #@923uf8023hFO@I#H# 
Php :: List all controllers in codeigniter HMVC structure 
Php :: image downlord 
Php :: install PHP extension "amqp" not found, please install it 
Php :: Ciclo for PHP ejemplos 
Php :: on keyup jquery for search php 
Php :: 0.02 eth to php 
Php :: wc php after login redirect page 
Php :: Trying to get property 
Php :: unlink() in php 
Php :: remove index.php 
Php :: laravel file permission denied 
Php :: laravel make migration 
Php :: read file and convert each line in array php 
Php :: php sql insert into if not exists 
Php :: regex sl nic validation laravel 
Php :: logout php code 
Php :: php class comment 
Php :: switch php version ubuntu 
Java :: The import javax.persistence cannot be resolved 
Java :: save map to file java 
Java :: junit 5 dependency maven 
Java :: spring cors allow all origins 
Java :: javafx tableview clear all data 
Java :: filll 2d array in java 
Java :: java reentrantlock 
Java :: java random max and min 
Java :: spring load config value in variable 
ADD CONTENT
Topic
Content
Source link
Name
6+8 =