Okay I have a hard time explaining this really quick so I am going to show my query and hopefully someone will understand what I am saying: $query = mysql_query("SELECT * FROM members WHERE login = '$loginid' AND url = '$url'"); I want to check a row for the URL set in $url, where the login is the same as loginid. I pass these vars. If there is NO result, do X If there IS a result, do Y That simple. Anyone have any advice?