注意:未定义的索引:C中的密码

时间:2016-10-01 21:33:30

标签: php mysql-error-1064

这是我的表格:

<form action="Register.php" method="POST">
<input type="text" placeholder="Username" name="Username" >     
<input type="Password" placeholder="Password" name="Password">
<input type="Password" placeholder="Confirm Password" name="Confirm_Password">
<input type="submit">
 </form>

这是我遇到麻烦的块

if(!empty ($_POST['Username']) && !empty($_POST['Password'])); 


$sql ="INSERT INTO users (Username,Password) values (:Username, :Password)";
$stmt= $conn->prepare ($sql);
$stmt->bindParam (':Username', $_POST ['Username']);
$stmt->bindValue(':Password', password_hash($_POST ['Password'], PASSWORD_BCRYPT));

if ($stmt-> execute()  ):
    die('success');
    else: 

请帮帮忙?

0 个答案:

没有答案