我希望我的会话 PHP 重定向到同一页面内的 jQuery 移动面板。我该怎么做?问题是,现在面板使用
<a href="#leftpanel1">
. 我可以让我的check.php
页面重定向以打开面板吗?
<?php
$user_name = "";
$password = ""; # Important: Change this for live database.
$database = "";
$server = "";
$user = $_POST['Username'];
$user_pass = $_POST['Password'];
session_start();
$_SESSION['logged_in'] = true;
$_SESSION['user'] = $user;
$db_handle = mysql_connect($server, $user_name, $password);
$db_found = mysql_select_db($database, $db_handle);
if ($db_found) {
$query = "SELECT username, password FROM users WHERE username = '$user' AND password = '$user_pass'";
$result = mysql_query($query);
$numrows = mysql_num_rows($result);
if ($numrows > 0){
header('Location: /Test.php');
} else {
echo 'PAGE NOT FOUND';
}
}
?>