这是我的代码,我的代码正在运行,但我的问题是当我尝试NSString *postString = @"username=example&firstlastname=example";
在它说示例的位置传递变量而不是名称时,我想要 = 一个 TextField 值,那么我该怎么做呢?我尝试过发布字符串附加字符串,但它没有用。请帮忙
NSURL *aUrl= [NSURL URLWithString:@"http://xxxx/iqueueinsertinjoinq.php"];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:aUrl
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
NSString *postString = @"username=example&firstlastname=example";
[request setHTTPBody:[postString dataUsingEncoding:NSUTF8StringEncoding]];
//NSURLConnection *connection= [[NSURLConnection alloc] initWithRequest:request delegate:self];
[[NSURLConnection alloc] initWithRequest:request delegate:self ];}