Return value on condition failing in PHP
<p>I need a return false if the query fails... where do i put it... </p>

<pre><code>function asas($username,$password){
    $qry = "SELECT * 
            FROM members 
            WHERE login='$username' AND passwd='".md5($password)."'";

    $result = mysql_query($qry);

    while($row = mysql_fetch_array($result)) 
    {
         return(array($row['userlevel'], $row['email']));
    }

    //return 'Invalid username / password ';
}
</code></pre>
