+ 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

6th Mar 2018, 1:05 PM
Franklyn Omeben
Franklyn Omeben - avatar
2 Réponses
+ 3
yes it does not update
6th Mar 2018, 6:22 PM
Franklyn Omeben
Franklyn Omeben - avatar
0
Is something wrong?
6th Mar 2018, 5:14 PM
Toni Isotalo
Toni Isotalo - avatar