I have the following code:
public function nuevoUsuario($id_empleado, $username, $correo, $pass, $id_tipo_usuario) {
//tiempo de espera
sleep(1);
try {
$this->Conectar_BD();
$this->query = "INSERT INTO usuarios(id_empleado, correo, pass, id_tipo_usuario, username) VALUES (?,?,?,?,?)";
$this->consulta = $this->conexion_bd->prepare($this->query);
$this->consulta->bind_param('sssis',$id_empleado,$correo, md5($pass),$id_tipo_usuario,$username);
if ($this->consulta->execute()) {
//Si se hace correctamente imprimimos true
echo "true";
} else {
//Sino imprimimos false
echo "false";
}
} catch (Exception $e) {
echo "false";
}
}
Which at the time of being executed sends me the following message:
Notice : Only variables should be passed by reference in C: \ xampp \ htdocs \ SICC-GC29012018 \ 29012018 \ SICC - GC \ php \ classes.php on line 152
false
I really do not know what to do, previously it worked for me.
Line 152 :
$this->consulta->bind_param('sssis',$id_empleado,$correo,md5($pass),$id_tipo_usuario,$username);