+ 3
changing the password row in my database but is not working
<?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
1 Respuesta
+ 1
some websites references to mysqli_connect_error() and mysqli_connect_errno() for troubleshooting. Maybe you can try those to get your error and search it. Hope it helps