Let your server (php file) todo the Hard job iOS side: Use something like that to upload POST your values into the server (php file)
-(void)upload
{
NSString *val1=@"";
NSString *val2=@"";
NSString *val3=@"";
NSString *urlString = [NSString stringWithFormat:@"http://domain.com/file.php?value1=%@&value2=%@&value3=%@",val1, val2,val3];
NSMutableURLRequest *request = [[NSMutableURLRequest alloc] init];
[request setURL:[NSURL URLWithString:urlString]];
[request setHTTPMethod:@"POST"];
NSMutableData *body= [NSMutableData data];
[request setHTTPBody:body];
NSData *returnData = [NSURLConnection sendSynchronousRequest:request returningResponse:NULL error:nil];
}
Note: use this returnData if you need get something back after your uploading, like success message or some JSON (whatever you want). Just Parse it to your needs.
On PHP file:
<?php
//GET the values from iOS.
$val1 = $_GET['value1'];
$val2 = $_GET['value2'];
$val3 = $_GET['value3'];
//connect to database
require 'connect.inc.php';
//just make INSERT SQL Request and done!.
?>
Hope It's Helping you.