这是我的代码,
<?php
function($string){
$salt = "@x5v";
$hash = sha1(md5($salt.$string)).md5($string).sha1(md5($string));
return $hash;
}
?>
<?php
print "<center>";
if(isset($_POST['username'])){
echo 'Variable is set and I can use it!';
}
$Username = $_POST["username"];
$Password = md5($_POST["password.$hash"]);
$Email = $_POST["email"];
?>
我认为这是导致问题的这条线:
$Password = md5($_POST["password.$hash"]);
将用户密码传递到数据库的正确语法是什么,用我上面定义的字符串加密?