Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $q = "SELECT * FROM users WHERE username = '$username' AND password = '$password'";
- $r = mysqli_query($dbc, $q) or die(mysqli_error($dbc));
- if (mysqli_num_rows($r) == 1)
- {
- $_SESSION['username'] = $username;
- echo '<script type="text/javascript">', 'LoginComplete();', '</script>';
- }
- else
- {
- echo '<script type="text/javascript">', 'LoginError();', '</script>';
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement