When the code and value are normal, php cannot receive post data and solve the problem. -Php Tutorial

Source: Internet
Author: User
When the code and value are normal, php cannot receive post data and solve the problem. Html code



Login. php

If ($ _ GET ['c'] = 'login '){
If (! Empty ($ _ POST ['login _ submit ']) {
Require 'perclass/login. admin. php ';
$ U = $ _ POST ['u'];
$ P = md5 ($ _ POST ['P']. LOGIN_PROTTY );
$ V = $ _ POST ['V'];
If ($ v = $ _ SESSION ['verification. Code']) {
Require_once 'perclass/filter. admin. php ';
LoginFun (FileTer ($ u), $ p, $ config );
} Else {
Echo <

:(

Incorrect verification code!!



End;
}
}
}

If ($ _ GET ['c'] = 'forget '){
Require 'perclass/login. admin. php ';
If (! Empty ($ _ POST ['sub _ email ']) {
Require_once 'Int _ mail. php ';
}
}

Login. admin. php

Function LoginFun ($ u, $ p, $ config)
{
$ New = new LoginCor ($ config );
$ R = $ new-> LoginPer ($ u, $ p );
If ($ r ){
$ _ SESSION ['User _ login'] = md5 ($ r ['username']. $ r ['password']. LOGIN_PROTTY );
$ _ SESSION ['nickname'] = $ r ['nickname'];
$ _ SESSION ['id'] = $ r ['id'];
Header ("location :? C = index ");
} Else {
Echo <

:(

Login failed!!



End;
}
Return $ r;
}

Function SiteQuery ($ config)
{
$ New = new LoginCor ($ config );
$ R = $ new-> SiteQuery ();
Return $ r;
}

Function UserForget ($ user, $ config)
{
$ New = new LoginCor ($ config );
$ R = $ new-> ForgetPass ($ user );
Return $ r;
}


Reply to discussion (solution)

Var_dump ($ _ POST) at the entrance );

Are you sure login. php has been executed?


What will login. php be executed ???

Can you give me more details. Not very familiar

Check whether the requested page exists.
Action = "admin? C = login"

Are you sure you have accessed admin? C = login

In admin? C = Add login
File_put_contents('sos.txt ', json_encode ($ _ REQUEST), true );
?>

Check whether sos.txt contains any content.

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.