jeudi 22 octobre 2020

i need to put a number and redirect to another url php [duplicate]

hello i dont know why when i submit a number i only get the first section here is my code i hope i get help i want when user type 1 he redirect to a url and when user type 2 he redirect to another 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;
}
?>```



Aucun commentaire:

Enregistrer un commentaire