Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- ob_start();
- $user = $_POST['un'];
- $pass = $_POST['pw'];
- $unpws = file("rest_data/eta_un_pw.txt");
- $allowLogin = false;
- for($i = 0; $i<count($unpws); $i++)
- {
- $tempArray = explode(":",$unpws[$i]);
- if($tempArray[0] == $user && $tempArray[1] == $pass)
- {
- $allowLogin = true;
- }
- else
- {
- $allowLogin = false;
- }
- }
- if($allowLogin == true)
- {
- session_start();
- $_SESSION['user'] = $user;
- ob_flush();
- header("Location: etaCreator.php");
- }
- else
- {
- echo "Sorry. Your username and password did not match.";
- }
- ?>
Add Comment
Please, Sign In to add comment