This is to check if the user Alias is already taken. However if the name is in there or not it still returns the error saying it is. What can i change so it only flags up when the user actually isn't in there.
$sql="SELECT * FROM blog_members WHERE user_alias='$this->userAlias'";
$result = mysql_query($sql);
if ($result) {
echo " - Error 5005 - This username is taken!";
$this->error[] = 1;
}