I stored a password in db, nw i want to change my password, with the fields of old password, new password, and confirm password
my question is how to retrive or compare password that i have entered in db with old password that i`m going to enter . if it is wrong it should show wrong password , and it should not go to another field, how it is possible in javascript.

Member Avatar for diafol

Not possible in javascript alone. You need to use ajax. JS is there for the world to see, so not secure. You use ajax to pass success/fail back to client, so actual hashed password in DB never seen.

I am assuming that you are hashing your passwords. If not, you must.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.