Why is the value of the session variable not being taken? How to fix it
Source: Internet
Author: User
Why is the value of the session variable not being taken?
The page that registers the session variable is written like this:
$username = $HTTP _post_vars["username"];
Session_register ("username");
On another page, judge this:
if (!isset ($_session["username") | | $_session["username"]== "")
{
Print ("Username unregistered!
");
Print ("Login
");
Die ();
}
else print ("username is registered!
");
$HTTP _post_vars["username"] already has the value, but in the judgment of the page printed out is username unregistered!, this is why?
PHP version is 4.3.9, is not the PHP configuration file to do what changes?
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.