Prevent double submit for recharge and renew

This commit is contained in:
Ibnu Maksum
2024-04-04 15:27:13 +07:00
parent eba6048abf
commit 71437b9a0e
8 changed files with 69 additions and 22 deletions

View File

@ -10,4 +10,20 @@ class App{
return true;
}
public static function getToken(){
return md5(microtime());
}
public static function setToken($token, $value){
$_SESSION[$token] = $value;
}
public static function getTokenValue($key){
if(isset($_SESSION[$key])){
return $_SESSION[$key];
}else{
return "";
}
}
}