Updating a database table – changing a user's password
In this recipe, you will learn how to update any information in the database. Changing passwords is a very common requirement in almost all applications. In this recipe, we assume that a database called ECommerce
already exists and a table called Users
also exists in the ECommerce
database. The Users
table consists of two columns, EmailAddress
and Password
. Also, we assume that the Users
table contains a few rows in it. The user will be prompted to enter their email address and password in the form. The Users
table is searched for the specified email address and password. If a row is found with the specified email address and password, the user will be prompted to enter a new password. The new password will be asked for twice, that is, the user will be asked to enter their new password in both the New Password
box and the Re-enter New Password
box. If the passwords entered in the two boxes match, the password will be changed, that is...