【发布时间】:2021-02-05 12:24:06
【问题描述】:
你好我不知道为什么当我提交一个数字时我只得到第一部分这是我的代码我希望我能得到帮助 我希望当用户类型 1 时他重定向到一个 url,当用户类型 2 时他重定向到另一个 url
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
<meta charset="UTF-8">
</head>
<body>
<div class=top>
<h2>6Virus | [ R00t ]</h2>
</div>
<center>
<img src="../img/anon.gif">
<h2 style="font-size: 12px;">~# Catch Your Windows C:/ ~</h2>
<img src="../img/app-store-2-128.png" style="margin-top: 10px;">
<form name="form1" action="app.php" method="post">
<input class=in type="text" name="here" placeholder="Here"/><br />
<button class=sub type="submit" name="submit">Submit</button>
</form>
</center>
</body>
</html>
<?php
if (isset($_POST['here']) == "1") {
header("Location: https://instagram.com");
exit;
}
elseif (isset($_POST['here']) == "2") {
header("Location: https://twitter.com");
exit;
}
elseif (isset($_POST['here']) == "3") {
header("Location: https://google.com");
exit;
}
?>```
【问题讨论】: