Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if (isset($_POST['userpassword']))
- {
- include('db.php'); //I am using passwordu instead of password.
- $query = "SELECT * FROM users WHERE username = '".$_REQUEST['username']."' AND passwordu = '".md5($_REQUEST['userpassword'])."'";
- $result = mysql_query($query);
- $num_rows = mysql_num_rows($result);
- if ($num_rows == 1)
- {
- echo "Congratulations. You are now Logged in. You will be logged out when the Browser is closed.";
- $_SESSION['logval'] = TRUE;
- }
- else
- {
- echo "You Have Entered Wrong Information. <b>Please Try AGAIN."; }
- ?>
- if ($num_rows >= 1)
- {
- //Correct info
- }
- else
- {
- //Incorrect info
- }
Add Comment
Please, Sign In to add comment