After I submit a form I have 2 $_POST variables. In the landing page I want to turn them into $_SESSION variables and unset the $_POST ones so that the user won't get the alert of the browser to send their data again. This is my (not working) code:
if(isset($_POST['clave']) && isset($_POST['email'])){
$_SESSION['id_user']=$_POST['clave'];
$_SESSION['email']=$_POST['email'];
}
if(isset($_SESSION['id_user']) && isset($_SESSION['email'])){
unset($_POST['clave']);
unset($_POST['email']);
//I do my stuff here
}
If I echo the posts nothing will show but everytime I reload I get the browser warning again.