NSURL *url = [NSURL URLWithString: @"www.bikrionline.com/database/iqry_mbr_mst.php"];
NSString *body = [NSString stringWithFormat: @"txtemail=%@&txtpwd=%@&txtcpwd", email, password,confirmpassword];
NSMutableURLRequest *request = [[NSMutableURLRequest alloc]initWithURL: url];
[request setHTTPMethod: @"POST"];
[request setHTTPBody: [body dataUsingEncoding: NSUTF8StringEncoding]];
[_webView loadRequest: request];
答案 0 :(得分:1)
您的格式字符串只有2个格式说明符,但您传递的是3个参数。让它们匹配。
检查一下:
[NSString stringWithFormat: @"txtemail=%@&txtpwd=%@&txtcpwd=%@", email, password,confirmpassword];
答案 1 :(得分:1)
试试这个..你错过了格式说明符(%@)
来确认密码。
NSString *body = [NSString stringWithFormat: @"txtemail=%@&txtpwd=%@&txtcpwd=%@", email, password,confirmpassword];
更新:使用http://
NSURL *url = [NSURL URLWithString: @"http://www.bikrionline.com/database/iqry_mbr_mst.php"];
同时检查..
UIWebView *webView=[[UIWebView alloc] initWithFrame:CGRectMake(0,0,320,480);
[self.view addSubView:webView];
答案 2 :(得分:0)
您错过了格式说明符,请尝试使用此
NSString *body = [NSString stringWithFormat: @"txtemail=%@&txtpwd=%@&txtcpwd=%@", email, password,confirmpassword];