How do I jump with the header?
I originally had a login.php, verify the username and password correctly after I use in PHP
echo ""; jump, results my colleagues in the ipad with Safari browsing, click the login button no response, username and password in the address bar can be seen. I can log in with Safari on my PC.
I think is not I use window.location reason, the authentication login extract to login2.php, want to use the header to jump, on the PC and ipad landed there on the login2.php don't give me jump.
login2.php file:
$rootdoc = $_server[' document_root ');
Require_once $rootdoc. ' /login/db/db.php ';
Define ("DEBUG", TRUE);
if (isset ($_request[' username ') &&isset ($_request[' PW ']))
{
$username =$_request[' username '];
$PW =$_request[' PW '];
if (DEBUG)
{
$database =new db (' localhost ', ' root ', ' 090807 ', ' practice ');
}
Else
{
$database =new db (', ', ', ', ');
}
$result = $database->query (' ', ' users ', ' username= ' $username ' and password= ' $PW ');
if ($result)
{
$count = mysql_num_rows ($result);
if ($count)
{
$row =mysql_fetch_array ($result);
$_session[' cuid ']= $row [' id '];
echo $_session[' cuid '];
echo "";
Header (' location:192.168.1.55/login/profile.php ');
Login is below Htdoc.
}
Else
{
echo "";
}
}
Else
{
echo "";
}
}
Else
{
Exit
}
------Solution--------------------
You this JS and PHP do not matter, change to this,
Plus/HTTP
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.