+ 2
how to change a password columm in my database <?php if (isset($_POST['submit'])) { include_once 'dbh.inc.php'; $hashedPwd = pa
how to change a password columm in my database <?php if (isset($_POST['submit'])) { include_once 'dbh.inc.php'; $hashedPwd = password_hash($newpwd, PASSWORD_DEFAULT); $sql = "UPDATE users SET user_pwd = $hashedPwd WHERE user_id = $_POST['email']"; } if (mysqli_query($conn, $sql)) { echo "Record updated successfully"; } else { echo "Error updating record: " . mysqli_error($conn); } mysqli_close($conn); ?> note that $newpwd is the new password the person has just typed in the html form
2 odpowiedzi
+ 3
yes it does not update
0
Is something wrong?