darkasecas, entonces que tengo que hacer, definir "$form"?
Aqui es donde lo tengo que definir?
Código PHP:
Ver originalfunction verifyFormToken($form) {
// check if a session is started and a token is transmitted, if not return an error
if(!isset($_SESSION[$form.'_token'])) { return false;
}
// check if the form is sent with token in it
if(!isset($_POST['token'])) { return false;
}
// compare the tokens against each other if they are still the same
if ($_SESSION[$form.'_token'] !== $_POST['token']) {
return false;
}
return true;
}
function generateFormToken($form) {
// generate a token from an unique value, took from microtime, you can also use salt-values, other crypting methods...
// Write the generated token to the session variable to check it against the hidden field when the form is sent
$_SESSION[$form.'_token'] = $token;
return $token;
}
Esque ya digo que no entiendo mucho de PHP...
Un saludo, gracias!