-
if request("act")="edit" and "id")<>"" then
username="username")
password="password")
repassword="repassword")if password<>repassword thenerrmsg=errmsg+"
The passwords entered are inconsistent! "
end if
id=request("id")
sql="select * from administrator where id="& "id")
sql,conn,1,3
if not then
rs("username")=usernamers("psw_asing")=passwordend if
end if
set rs=nothing
set conn=nothing
-
Question 1:
As mentioned above, check if the fields you use exist in the database.
Question 2: Your SQL statement is missing a where statement (or do you want to update the entire database?) ) sql="select * from user where user='user'"(In addition, the user you want to modify doesn't seem to be in the data sheet, right?) )
-
Validate the input.
Commit the change: %dim action
action=trim(request("action"))if action="chkadmin" thenrenewpwd="renewpwd")
pid="oldpwd")
set rs= ("")
sql,conn,1,3
if not then
if rs("pid")<>pid then""
end if
rs("pid")=renewpwd
set rs = nothing
end if
end if
-
Usually with the user system needs to make the function of changing the password, literally change the password, in fact, it is the record update function that we usually write, the password is very simple, you only need to execute a SQL statement in the asp page to achieve the password update, but for security reasons, we need to authenticate the user to prevent the password from being illegally tampered with by criminals, the current popular verification methods on the network generally are: verification password, email authentication, problem verification, SMS authentication, etc., usually a simple user system to make a password verification or problem authentication is good, changing the password is very simple, but for security, we need to complicate it, it is just an ordinary record update.
Normal password change:
dim password
password="password")
set rs="")
Original password verification&"' and username='"& pass in the current login username &"'" ,conn,1,1
-
You hi me, I'll write you one... Different programs,Change the password is different.。。。
-
Simple and convenient: <%.
if "submit") = "Change your password" thenapwd="apwd")
pwd="pwd")
uname=session("login")if pwd<>"" then
if pwd=apwd then
set rs="")
sql,conn,1,3
rs("pwd")=pwd
set rs=nothing
alert('Password change successful! ')")
alert('The passwords are not the same')")
end if
alert('The password box cannot be empty! ')")
end if
end if
-
at set rs="")
Add these sentences and replace the SQL statement with the following:
exec,conn,1,1
if and then
elsesqlend if %>
-
password=trim("pad"))
Are you sure it's pad and not psd?
Or whether the passwords in the database are encrypted.
-
if and then
You're not changing the password here, you're creating a new user, right?
That's what you mean:
Execute when the relevant user information cannot be found from the database"The password is changed successfully"
And here, you don't define the insertion**. Of course, the password cannot be inserted...
-
rs1,objconn,1,3
if and then
The password is changed successfully"
end if
You add else before the end if above"No user found"
There will be a hint.
-
It should be written.
if not is then
In addition, if this happens in the future, you can add the endpoint yourself, for example, in the first line of the program"test"See if the program is running, and if it does, then add it in some suspicious places.
If you have a problem, you post all of it, or send it to me to help you modify it. >>>More
Take a look at the wifi gateway first, and then log in to the gateway in the browser, and you can change the wigi name and password at will.
1. Double-click to open the "Steam Platform Client".
2. Go to the Steam login interface, enter your account and password, and click "Login". If not, you can register and log in. >>>More
A password is a technique used to obfuscate the normal (identifiable) information and turn it into an unrecognizable one. Of course, for a small group of people, this unidentifiable information can be reprocessed and recovered. The password is in Chinese"Password"(password). >>>More
Q: Sometimes I want to change the wifi password on the wireless router, but there is no computer around, only a mobile phone, how to change the wifi password with a mobile phone? Or how to set a wifi password with a mobile phone? >>>More