Urgent! Write a registration page, including the user name and password. during registration, you must enter 12345 for the password to be registered and then enter the database. If the password is not 12345, an error reminder will not be returned! Write a registration page, including the user name and password. during registration, you must enter 12345 for the password to be registered and then enter the database. If the password is not 12345, an error reminder will not be returned! Write a registration page, including the user name and password. during registration, you must enter 12345 for the password to be registered and then enter the database. If the password is not 12345, an error message is returned if the password is not.
Urgent! Write a registration page, including the user name and password. during registration, you must enter 12345 for the password to be registered and then enter the database. If the password is not 12345, an error message is returned if the password is not.
------ Solution --------------------
If ('000000' <> $ _ POST ['pwd'])
{
Exit ('you must set the password to 123 ');
}
------ Solution --------------------
No database content.
A. php
B. php
Mysql_connect ('localhost', 'root ','');
Mysql_query ('set NAMES "GBK "');
Mysql_select_db ('databases ');
If (isset ($ _ POST ['passwd']) {
If (intval ($ _ POST ['passwd']) = 12345 ){
$ Name = $ _ POST ['username'];
$ Pass = intval ($ _ POST ['passwd']);
$ SQL = "INSERT INTO table (username, passwd) VALUES ('{$ name}', '{$ pass }')";
Mysql_query ($ SQL );
} Else {
Exit ('error .');
}
}
?>
------ Solution --------------------
You want to submit your homework =!
------ Solution --------------------
Since it is a dead write, do not display the password when entering the data. just enter the database as the default value.
After the registration is successful, let him change it.
------ Solution --------------------
You can also add verification on the submit page.
If the password is not 12345, do not submit it:
JScript code
If (document. getElemntById ("password ")! = '000000') {alert ("incorrect password! "); Return ;}