php传值问题
<?php
include "../conn.php";
?>
<?php
ob_start();
$user_id=$_POST['userid'];
$passwd=$_POST['password'];
$exe=$user_id;
//echo $user_id;
$sql="select * from tb_user where user_id='$userid' and password='$passwd'";
$flag = mysql_query($sql);
$result = mysql_fetch_array($flag);
$user_type = $result["user_type"];
if($result!=false)
{
echo "<script> alert('".$user_id."登陆成功'); </script>";
}
else{
echo "<script> alert('用户名或密码错误'); </script>";
echo '<script>window.location="../main.php";</script>';
}
?>
<html>
<head>
<script>
function showpage(obj,user_id,user_type)
{
window.location="./top.php?userid="+user_id+"&&user_type="+user_type;
}
</script>
</head>
<body>
<a href="javascript:showpage(this,<?php echo $user_id; ?>);" class="navText">登记</a>
</body>
</html>
不能跳转,不知道是什么问题。是一网页错误