Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- //Important variables
- $username = $_POST['username'];
- $password = $_POST['password'];
- $file = "users.txt";
- $text = "\n$username\n$password\n";
- /////////////////////////////////////////////////////////
- //Checks for only numbers and letters
- function check_for_correct_values($input, $text)
- {
- if (! eregi("^[a-zA-Z0-9]*$", $text) )
- {
- echo $text;
- }
- }
- check_for_correct_values($username, 'Username contains invalid characters.<br><br>')
- check_for_correct_values($password, 'Password contains invalid characters.<br><br>')
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement