The logon code of the message board written by beginners. you can help your younger brother to see why you need to click login twice to log on. why do you need to click login twice to exit?

Source: Internet
Author: User
The logon code of the message board written by Cainiao can help you see, why do you need to click login twice to log on? why do you need to click exit twice to exit? The logon code of the message board written by Cainiao can help you see, why do you need to click login twice to log on? why do you need to click exit twice to exit? Where is the problem? thank you for taking a look. The code is as follows: the logon code of the message board written by Cainiao can help you see why you need to click login twice to log on. why do you need to click login twice to exit?
The logon code of the message board written by Cainiao can help you see, why do you need to click login twice to log on? why do you need to click exit twice to exit? Where is the problem? thank you for taking a look. The code is as follows:
 Include ("SQL. php ");
If ($ _ GET [out])
{
Setcookie ("cookie", "out ");
Echo" Localhost. href = 'login. php'; script ";
}
If ($ _ POST [id] = 'XXX ')
{
$ Pw = md5 ($ _ POST [pw]);
If ($ pw = 'e1bfd762321e409cee4ac0b6e841963c ')
{
Setcookie ("cookie", "OK ");
Echo" Localhost. href = 'login. php'; script ";
}
}
Include ("Head. php ");
If ($ _ COOKIE ['cooker']! = 'OK '){
?>


Function Checklogin ()
{
If (myform. id. value = "")
{
Alert ("Enter the login name ");
Myform. id. focus ();
Return false;
}
If (myform. pw. value = "")
{
Alert ("The password cannot be blank ");
Myform. pw. focus ();
Return false;
}
}
SCRIPT

 
} Else {
?>
Exit
}
?>
The code written by PHP Cainiao is shared:
------ Solution --------------------

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.