$contrasena = $_POST['contrasena']; $encriptar = md5($contrasena); INSERT INTO tabla contrasena VALUES $encriptar;