Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to store the values in web server from i phone application
    text
    copied!<p>I am developing view based application.In my view i have register page in that page i have some fields like Firstname, lastname,e mail ID. When we click save button after entering the values these all field should be store in in webserver.In webserver i have application that application was developed using .net MVC Architecture and database is MYSQL .How i can store these values in webserver.</p> <p>thanks for your response i have written this code is it right way to store values in webserver</p> <pre><code> -(IBAction)buttonClick:(id)sender { NSString* firstname = nameInput.text; NSString* lastname = passInput.text; NSString* bname = lastInput.text; NSString *post = [[NSString alloc] initWithFormat:@"fname=%@&amp;lname=%@&amp;email=%@",firstname,lastname,bname]; NSData * postData = [post dataUsingEncoding:NSASCIIStringEncoding allowLossyConversion:NO]; NSString * postLength = [NSString stringWithFormat:@"%d",[postData length]]; NSMutableURLRequest * request = [[[NSMutableURLRequest alloc] init] autorelease]; [request setURL:[NSURL URLWithString:[NSString stringWithFormat:@"http://www.yoursite.com/file.php?%@",post]]]; [request setHTTPMethod:@"POST"]; [request setValue:postLength forHTTPHeaderField:@"Content-Length"]; [request setValue:@"application/x-www-form-urlencoded" forHTTPHeaderField:@"Content-Type"]; [request setHTTPBody:postData]; NSURLConnection * conn = [[NSURLConnection alloc] initWithRequest:request delegate:self]; if (conn) NSLog(@"Connection Successful"); } @end </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload