close ad
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

Updating a password hash field - stopped working

Thread began 1/30/2023 7:47 am by sandy170299 | Last modified 2/04/2023 1:52 pm by sandy170299 | 184 views | 4 replies


Updating a password hash field - stopped working

For some reason, this stopped working. Using the update MySQLi server behavior, I have the following code:

if (isset($_POST["Update"]) || isset($_POST["Update_x"])) {
$password = $_POST['user_password'];
$hash = password_hash($password, PASSWORD_DEFAULT);
$UpdateQuery = new WA_MySQLi_Query($numdb);
$UpdateQuery->Action = "update";
$UpdateQuery->Table = "users";
$UpdateQuery->bindColumn("acct_number", "i", "".((isset($_POST["acct_number"]))?$_POST["acct_number"]:"") ."", "WA_DEFAULT");
$UpdateQuery->bindColumn("balance", "i", "".((isset($_POST["balance"]))?$_POST["balance"]:"") ."", "WA_DEFAULT");
$UpdateQuery->bindColumn("line_of_credit", "i", "".((isset($_POST["line_of_credit"]))?$_POST["line_of_credit"]:"") ."", "WA_DEFAULT");
$UpdateQuery->bindColumn("user_name", "s", "".((isset($_POST["user_name"]))?$_POST["user_name"]:"") ."", "WA_DEFAULT");
$UpdateQuery->bindColumn("user_password_hash", "s", "#hash", "WA_IGNORE");
$UpdateQuery->bindColumn("user_email", "s", "".((isset($_POST["user_email"]))?$_POST["user_email"]:"") ."", "WA_DEFAULT");
$UpdateQuery->bindColumn("user_active", "i", "".((isset($_POST["user_active"]))?$_POST["user_active"]:"") ."", "WA_DEFAULT");
$UpdateQuery->bindColumn("referrer", "i", "".((isset($_POST["referrer"]))?$_POST["referrer"]:"") ."", "WA_DEFAULT");
$UpdateQuery->bindColumn("analogcode", "i", "", "WA_DEFAULT");
$UpdateQuery->bindColumn("notes", "s", "".((isset($_POST["notes"]))?$_POST["notes"]:"") ."", "WA_DEFAULT");
$UpdateQuery->addFilter("user_id", "=", "i", "".($WADAusers_update->getColumnVal("user_id")) ."");
$UpdateGoTo = "accounts.php";
if (function_exists("rel2abs")) $UpdateGoTo = $UpdateGoTo?rel2abs($UpdateGoTo,dirname(__FILE__)):"";

If the password is not physically changed in the form field, I want it to ignore it, so I'm using WA_IGNORE to update that field. It's not working. Each time I try to log in after changing the password, I get a password failed page, which I created if the login didn't work. What is the correct syntax I should be using for this field?

Thank you.

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question





Ease of use


security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...