Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $username = $_POST['username']; //this is the username passed
- $password = $_POST['password']; //this is the password passed
- $checkQuery = "SELECT username, password FROM users WHERE username='$username' password='$password'";
- $checkQueryResult = mysql_query($checkQuery) or die(mysql_error());
- if ( mysql_num_rows($checkQueryResult >= 1) )
- {
- $_SESSION['username'] = $username;
- }
- else
- {
- echo "Login Credentials do not match."
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement