我有一个搜索页面,其中弹出窗口打开,弹出登录后我想重定向相同的 URL,这意味着 URL 没有更改。那么我该如何重定向呢?
这是搜索页面弹出代码:
<div id="light">
<form action="tutors_login1.php" method="post" name="form">
<center>
<table>
<tr><td>
PLEASE LOGIN
</td></tr>
<tr><td>
User Email <input type="text" name="email" />
</td></tr>
</tr><td>
Password <input type="password" name="password" />
</td></tr>
<tr><td>
<input type="submit" name="submitbut" value="Login" />
</td></tr>
</table>
</center>
</form>
</div>
<div id="fade" onClick="lightbox_close();"></div>
这是我重定向页面的登录页面代码
if($flagl=='lgin'){
header('Location: my_account.php');
}
$tabl = 'tutor';
if($_POST['submitbut'] == 'Login') {
$stateid=$_REQUEST['country'];
$cityid=$_REQUEST['state'];
$areaid=$_REQUEST['city'];
$email = mysql_real_escape_string($_POST['email']);
$password = mysql_real_escape_string($_POST['password']);
$sql = "SELECT * from $tabl where email='$email' AND password='$password' AND app='1'";
$exec = mysql_query($sql);
$num = mysql_num_rows($exec);
if($num == 1) {
$fetch = mysql_fetch_assoc($exec);
$_SESSION['login'] = $fetch['uniq'];
$_SESSION['email'] = $fetch['email'];
$email = $_SESSION['email'];
$_SESSION['type'] = 'tutor';
header("Location: latest_tuition_jobs.php");
}
if($sql1 = "SELECT * from $tabl where email='$email' AND password='$password' AND app='0'")
{
$exec1 = mysql_query($sql1);
$flag_r1 = 'r';
} else {
$flag_r = 'r';
}
}