You are eager to enter a registration page, including the user name and password. you must enter 12345 for the registration and then enter the database. If the password is not 12345, an exception reminder is returned if the password is not.

Source: Internet
Author: User
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 ;}

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.