Well, for one thing, $db is undefined within the function.
You should also check that in your test there is an active DB connection, and that the query is correctly formed.
A possible version of code:
function auth($_username, $_password)
{
global $db;
$get_users = mysql_query("SELECT * FROM " . $db['users'] . " WHERE username='$_username' AND password='$_password'")
OR die(mysql_error());
if (mysql_num_rows($get_users) == 0)
return FALSE;
elseif (mysql_result($get_users, 0, "app") == 1)
return "APP";
else
return TRUE;
}
incidentally, one should avoid variable names that begin with an underscore, though it doesnt really matter.