Accessing data from server through php in iphone -
I am using this code to access data from the server,
NSString * post = [[NSString alloc] initWithFormat: @ "email =% @", Jiimel]; NSDTA * PostData = [Post Data Usage Encoding: NSSEIITITING Encoding Permission Loansy Conversion: Yes]; NSString * postLength = [NSString stringWithFormat: @ "% d", [Postdeta length]]; NSURL * url = [NSURL URLWithString: @ "http://smads.in/day.php"]; NSMutableURLRequest * theRequest = [NSMutableURL request request withURL: url]; [TheRequest set HTTP method: @ "post"]; [TheRequest set value: post length for the http header field: @ "content-length"]; [TheRequest Set HTTPBB: PostData]; NSURLConnection * theConnection = [[NSURLConnection alloc] initWithRequest: theRequest Representative: Self]; If (connection) {webData = [[NSMutableData data is maintained]); } Does Else {}
Get a little late data so the problem is that - I have a code that checks the data received from the server -
if (flag == 1) NS log (@ "yes"); Other NSlog (@ "no");
When I click first then do not print it when I click again, it appears so.
How do I check the status in one click?
I suggest that any idea .....
Thanks,
Arun
You can do one thing.
Unless you receive a response from the request, do not allow the user to click on the button.
You can use user interaction property
Comments
Post a Comment