I've been trying to use security tokens created randomly but when I type $token = crypt($_POST['token']);
In the browser I get:
Notice: Undefined index: token in C: \ xampp \ htdocs \ test \ token.php on line 20
This is the code
<?php
session_start();
// Do Something
?>
<?PHP
$user_pass = 'Mi_Pasw0rd';
$salt = md5($user_pass);
$pasword_encriptado = crypt($user_pass, $salt);
echo $pasword_encriptado;
?>
<?PHP /*Página de inicio de sesión */
/* Si las credenciales de usuario se validan se abre una sesión y */
/* se agrega el token a la variable $_SESSION .*/
$token = crypt($_POST['token']);
$_SESSION["token"] = $token;
?>
<?PHP /*Página de inicio de sesión */
$pass = $_POST['password'];
$passHash = password_hash($pass, PASSWORD_BCRYPT);
password_verify($pass, $passHash)
?>
Any idea what could be happening?