if else 条件を使用して変数をチェックしていますが、値が true の場合も常に else を実行し、else も表示します
NSString *data=[[NSString alloc]initWithData:urlData encoding:NSUTF8StringEncoding];
NSLog(@"%@",data);
if ([data isEqualToString:@"Yes"]) {
UIAlertView * alert = [[UIAlertView alloc] initWithTitle:@"Welcome" message:@"Successful Login" delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil];
[alert show];
[alert release];
}
else {
UIAlertView * alert = [[UIAlertView alloc] initWithTitle:@"Error" message:@"Incorrect user name or password" delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil];
[alert show];
[alert release];
}