Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $lines = file("secure.txt");
- print"$lines[0]";
- print "$lines[1]";
- if( strcmp($_POST['username'],$lines[0]) == 0
- && strcmp($_POST['password'],$lines[1]) == 0)
- {
- //code
- }
- else
- {
- print access denied stuff
- }
- secure.txt contains:
- admin
- password
- user enters in the form
- username: admin
- password: password
Add Comment
Please, Sign In to add comment