选项卡面板特定页面的php代码
我有登录页面和配置文件页面,如果登录重定向到特定的选项卡面板 我的代码如下 登录页面选项卡面板特定页面的php代码,php,Php,我有登录页面和配置文件页面,如果登录重定向到特定的选项卡面板 我的代码如下 登录页面 <form action="login.php" method="post"> <input type="email" name="email"> <input type="email" name="password"> <input type="submit" value="login" name="login"> </form> <?php
<form action="login.php" method="post">
<input type="email" name="email">
<input type="email" name="password">
<input type="submit" value="login" name="login">
</form>
<?php
ob_start();
session_start();
include 'db.php';
if(isset($_POST['login']))
{
$email= $_POST['email'];
$password = $_POST['password'];
$sql = mysql_query("select * from user_details where email= '$email' and password = '$password'");
$rows = mysql_fetch_array($sql);
$count = mysql_num_rows($sql);
if($count==1)
{
$_SESSION['phone'] = $phone;
header('Location: profile.php#edit');
}
else
{
echo "<script>alert('Invalid Phone Number and Password Try Again'); location.href='index.php';</script>";
}
}
?>
<div class="panel-body">
<div class="tab-content">
<div class="tab-pane active" id="profile">Profile tab </div>
</div>
</div>
<div class="panel-body">
<div class="tab-content">
<div class="tab-pane" id="edit">Edit Profile tab </div>
</div>
</div>
实际上我知道header()可以访问选项卡面板id,这就是为什么可能的原因?