I have a single script that checks if it is already executed by user. It uses sessions.
Code: Select all
session_start();
if(!isset($_SESSION['executed'])){
/*
bunch of codes here ...
*/
$_SESSION['executed'] = true;
}But from now on, every POST variables to be passed in this script will not work because the session is still alive.
Of course, you may say that I have to session_destroy() or unset() this session variable. But doing so, will disable my checking, making the script to be executed repeatedly on browser refresh.
Any idea on how or when to kill session without spoiling the checking?