require('db.php');
$query = 'SELECT username,password FROM users';
$result = mysql_query($query, $db);
$text = mysql_fetch_assoc($risultato);
if($text['username'] == $_POST['user'] && $text['password'] == $_POST['pass']) {
echo $text['username'];;
}
else {
echo 'NO!';
}
I'm a young italian developer: This mysql select result is only the first line of the table, i'm writing the code for a login.php page. Should i use WHERE ?How? I also have an id field (BIG INT(20) NOT NULL AUTO INCREMENT)