I turn to you again because the papers were burned ... I do not know what the problem may be. I'm with a registration system, to which I add the validation by google recaptcha. The validation works perfectly, the point is that when verifying that the user is "HUMAN", he then loads the entire sequence of validations that are added in the form. I was detecting that the error occurs to me in the process of recording the data in the users table. To save the data I call a function in PHP that is the following:
function registraUsuario($usuario, $pass_hash, $nombre, $email, $activo, $token, $tipo_usuario, $usuclase){
$ul_list = json_encode($usuclase);
global $mysqli;
$stmt = $mysqli->prepare("INSERT INTO usuarios (usuario, password, nombre, correo, activacion, token, id_tipo, clase, nrologins) VALUES(?,?,?,?,?,?,?,?,?)");
$stmt->bind_param('ssssisisi', $usuario, $pass_hash, $nombre, $email, $activo, $token, $tipo_usuario, $ul_list, $nrologins);
if ($stmt->execute()){
return $mysqli->insert_id;
} else {
return 0;
}
}
The error that throws me is that this function returns "0" ... I was seeing all the data that is passed to the function and they are all correct. I want to emphasize that the variable ul_list is an array that happened after the user in the registration process selects several options in a select multiple, raising the codes of the selections made ... I store that array in the CLASS field ... As I told you, I was looking at each of the fields that I send to the function and they are all fine ... I'm afraid the error is in how I keep that data (the array) in the database ... They give me a hand? I thank you very much ...