我使用下面的代码从通过PHP的Xcode应用的MySQL表中插入MySQL中,连接的Xcode通过PHP
-(void)insertDetails:(NSString *)userEmail loginType:(int)type{
login_email = userEmail;
NSString *strUrl = [NSString stringWithFormat:@"http://localhost/insertLoginDetails.php?userEmail=%@&login_type=%d",userEmail,type];
NSData *dataUrl = [NSData dataWithContentsOfURL:[NSURL URLWithString:strUrl]];
NSString *strResult = [[NSString alloc] initWithData:dataUrl encoding:NSUTF8StringEncoding];
NSLog(@"%@",strResult);
}
这个使用GET方法,任何人都可以请告诉我如何使用POST方法为上述过程。
在此先感谢。
问候,
NEHA
垂直投票....好吧,但为什么? – abmussani