The post value cannot be obtained. how can this problem be solved?
Source: Internet
Author: User
The value of post cannot be obtained & lt; forw.hod = & quot; post & quot; action = & quot; http: // localhost/secret. php & quot; & gt; & nbsp; & lt; tableborder = & quot; 1 & quot; The post value cannot be obtained.
Why can't I upload the name and password to secret. php for a beginner?
// Secret. php
// Create short names for variables
If ($ _ POST ['name'] = ''& $ _ POST ['password'] = '')
{
// Visitor need to enter a name and password
Echo 'Please input an valid username and password ';
}
Elseif ($ _ POST ['name'] = 'root' & $ _ POST ['password'] = '000000 ')
{
Echo 'Welcome to the New World! ';
}
Else
{
Echo 'You are not welcome! ';
}
?>
------ Solution --------------------
The name attribute needs to be added to the input control. The browser will submit the value to the server only in this way.
Username
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