Thanks for the replay. I pasted the code into my php file and I got this error:
Warning: Wrong parameter count for mysql_num_rows() in c:\inetpub\wwwroot\php\login\login.php on line 23
no record matching that username/password
I also tried this and it worked fine with no errors apart from when it couldn't find the username and password:
$query_user = "SELECT username FROM users where username = '$input_username' ";
// $result_user = mysql_query($query_user);
// $query_pass = "SELECT password FROM users where password = '$input_password' ";
// $result_pass = mysql_query($query_pass);
//This is where you asign value to variable:
//$enter_user = mysql_result($result_user,0,'username');
//$enter_pass = mysql_result($result_pass,0,'password');
// if (($enter_user == $POST['username'])&($enter_pass == $POST['password'])){
// echo header('Location: index.php?true');
// } elseif
// (($enter_user == $POST['username'])&($enter_pass == $POST['password'])){
// $_SESSION['name'] = array();
// session_destroy();
// echo header('Location: index.php?false');
// }