2014-01-31 28 views
-4
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

这里有个问题吗?遵循这个指导:http://stackoverflow.com/help/mcve –

回答

0

你已经错过了格式说明尝试使用此

NSString *body = [NSString stringWithFormat: @"txtemail=%@&txtpwd=%@&txtcpwd=%@", email, password,confirmpassword]; 
+0

你的答案和我的答案有什么区别? – Mani

+0

没有区别是否有呐。 – veeresh

1

您的格式字符串只有2个格式说明符,但您传递的是3个参数。让他们匹配。

检查:

[NSString stringWithFormat: @"txtemail=%@&txtpwd=%@&txtcpwd=%@", email, password,confirmpassword]; 
+0

再次显示一个错误 – veeresh

+0

我如何检查那个在safari – veeresh

+0

什么是错误? – rmaddy

1

试用确认passord这个..你已经错过了格式说明(%@)

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]; 
+0

在UIVIEW可能无法响应加载请求在webview – veeresh

+0

在safari手动检查您的网址是否是工作或不? – Mani

+0

我是一个新手如何检查safari – veeresh