AlexejheroYTB
-
Posts
7 -
Joined
-
Last visited
Posts posted by AlexejheroYTB
-
-
WORKS! THANKS!
-
i got that code from another forum and a moderator from that forum told me to come to this forum
now uploading...
-
ill try that
-
the variable names are correct
<?php if(isset($POST['pin']) AND !empty($POST['pin'])){ $input = $_POST['pin']; $pinI = "6203"; $pinII = "9471"; if($input == $pinI){ header("Location:pinI.html"); }else{ if($input == $pinII){ header("Location:pinII.html"); }else{ echo "PIN INCORRECT!"; }} }else{ echo "PIN EMPTY!"; }
-
It still says PIN EMPTY!
my code now:
<?php if(isset($POST['pin']) AND !empty($POST['pin'])){ $input = $_POST['pin']; $pinI = "6203"; $pinII = "9471"; if($input == $pinI){ header("Location:pinI.html"); }else{ if($input == $pinII){ header("Location:pinII.html"); }else{ echo "PIN INCORRECT!"; }} }else{ echo "PIN EMPTY!"; }
-
So, I am trying to create a website where you enter a pin, it redirects you to a page, enter another pin, it redirects you to another page.
I have two files:
th1.php (the main file)<?php //require_once"app/init.php ;?> <!DOCTYPE HTML> <link rel="stylesheet" type="text/css" href="style.css" /> <form action="th.php" method="POST"> <div class="container"> <input type="text" placeholder="Enter PIN" name="pin" required> <button type="submit" name="sub" value="Submit">Submit</button> </div> <div class="container" style="background-color:#f1f1f1"> </div> </form>
and th.php (the verification file)
<?php if(isset($POST['pin']) AND !empty($POST['pin'])){ $input = $_POST['pin']; $pinI = "6203"; $pinII = "9471"; if($input === $pinI){ header("Location:pinI.html"); }else{ if($input === $pinII){ header("Location:pinII.html"); }else{ echo "PIN INCORRECT!"; }} }else{ echo "PIN EMPTY!"; }
but any code I insert, even the correct one, it sais PIN EMPTY!
can you help me please?
Need help please
in PHP Coding Help
Posted
this is the code that works: