if($_GET['youselectvar']=="1") //or $_POST
{header("location:index1.php");}
elseif($_GET['youselectvar']=="2")
{header("location:index2.php");}
{header("location:index1.php");}
elseif($_GET['youselectvar']=="2")
{header("location:index2.php");}
PHP也可以搂主,最好把你的想法写出来之后,大家可以帮你修改。
if($select==1)
{
echo "<script>";
echo "alert('登陆成功!');window.location='xxx1.php'";
echo "</scirpt>";
}
elseif($select==2)
{
echo "<script>";
echo "alert('登陆成功!');window.location='xxx2.php'";
echo "</scirpt>";
}
else
{
echo "<script>";
echo "alert('登陆成功!');window.location='xxx3.php'";
echo "</scirpt>";
}
这个不行吗?