how to upload data to the field with MD5 with php and mysqli?

0
 if(isset($_POST['regi'])){
$Nombre = $_POST['name'];
$apellido = $_POST['apellido'];
$email = $_POST['email'];
$pass = $_POST['pass'];


mysqli_query($conect,"INSERT INTO Usuario 
(Nombre,Apellido,Email,Password) VALUES 
('$Nombre','$apellido','$email',MD5('$pass'))");

everything goes up except the pass and I do not know if I'm getting wrong to upload in MD5

    
asked by Vinicio Moya Almeida 30.10.2017 в 01:10
source

1 answer

0

You can calculate the MD5 checksum in php and send it in the query:

$pass = md5($_POST['pass']);

mysqli_query($conect,"INSERT INTO Usuario (Nombre,Apellido,Email,Password) VALUES('$Nombre','$apellido','$email','$pass')");

the md5 has a length of 32 ...

    
answered by 30.10.2017 в 22:01