what wud be the code for password change option
dear guys
now i can log in by user name and user password by usuing login table (username & userpassword)
what if a user want to change his password then what wud be the code for that ..
pls give me some hints
ur help wud be appriciated for a bigginer like me
regards
imti
Re: what wud be the code for password change option
It is simply a matter of updating a record in a table like any other.
VB Code:
Dim myCommand As New SqlCommand("UPDATE Users SET userpassword = @newpassword WHERE username = @username", myConnection)
myCommand.Parameters.Add("@newpassword", newPasswordString)
myCommand.Parameters.Add("@username", currentUserNameString)
myConnection.Open()
myCommand.ExecuteNonQuery()
myConnection.Close()
Note that you would put the appropriate values where I have used "newPasswordString" and "currentUserNameString".