Why can't the value of the SESSION variable be obtained? How to solve
Source: Internet
Author: User
Why can't the value of the SESSION variable be obtained? On the registration SESSION variable page, enter $ username & nbsp ;=& nbsp; $ HTTP_POST_VARS [& quot; username & quot;]; session_register (& quot; username & quot;); why can't the value of the SESSION variable be obtained?
The registration SESSION variable page is written as follows:
$ Username = $ HTTP_POST_VARS ["username"];
Session_register ("username ");
On another page, make the following judgment:
If (! Isset ($ _ SESSION ["username"]) | $ _ SESSION ["username"] = "")
{
Print ("username unregistered!
");
Print ("Login
");
Die ();
}
Else print ("username is registered!
");
$ HTTP_POST_VARS ["username"] already has a value, but what is printed on the judgment page is username unregistered !, Why?
PHP version 4.3.9. is it necessary to modify the PHP configuration file?
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.