Parašė Pakartoti slaptažodį· 2014 Kov. 25 19:03:22
#5
if (empty($username) || empty($password)) {
$errors[] = 'You need to enter a username and password';
} elseif (mysql_num_rows(mysql_query("SELECT username FROM users WHERE username = '".$username."'")) != 1) {
$errors[] = 'We can\'t find that username. Have you registered?';
} elseif (!user_active($username)) {
$errors[] = 'You haven\'t activated your account!';
} else {
// cia kazkas vyksta jei prisijungem gerai
}
print_r($errors);
o jei patikrinimą va tokį padaryt, ne per funkciją? jei ir dabar rodys klaidą, vadinasi tikrai nėra to userio, patikrink
mysql