In this script I am authenticating anyone that has the appropriate passphrase. I have it working except for the part that sends them to a different location if the passphrase is correct. The following is my code:
Any ideas? And yes, I have ensured that I have created a file with the name index2.php in the same directory.
Thanks in advance,
-minty
| Code: |
|
<?php //ensures the form has been submitted, else displays the form if (isset($_POST['pass'])) { Auth_Check($_POST['pass']); }else{ Display_Form(); } //FUNCTIONS //Ensures the accurate passphrase has been used and redirects to another site function Auth_Check($pwd) { if ($pwd=="...."){ header("Location: /index.2.php"); //this is where it is not working...keeps bringing up a "Cannot find" error }else{ //Displays an error message if wrong passphrase echo "<font color=\"red\"><center>You have supplied an inaccurate passphrase</center></font>"; Display_Form(); }} //used to display the form to login with function Display_Form() { ?> <form name="login" action="index.php" method="POST"> <center> <input type="password" name="pass"> <input type="submit" value="Login"> </center> </form> <?php } ?> |
Any ideas? And yes, I have ensured that I have created a file with the name index2.php in the same directory.
Thanks in advance,
-minty
