Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- include 'mysql-connect.php';
- $username = $_POST['user'];
- $password = $_POST['pass'];
- $query1 = mysql_query("SELECT * FROM users WHERE username='$username'");
- $result = mysql_num_rows($query1);
- if($result == 0)
- {
- include '<h1>Error!</h1>The username you specified does not exist!';
- }
- else
- {
- $checkuser = mysql_query("SELECT * FROM users WHERE username='$username'");
- $row = mysql_fetch_array($checkuser);
- $password2 = $row['password'];
- $status = $row['status'];
- if ($password == $password2)
- {
- //PUT PASSWORD PROTECTED INFORMATION HERE
- }
- else
- {
- echo '<h1>Error!</h1>The username and password combination you entered does not match the ones we have in the database.';
- }
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement