title: POST method in objective-C and PHP
body: <p>I have created the following POST method via objective-C</p>
  
  <pre><code>-(IBAction) postLocation: (id) sender{
   NSString *latitude = @"37.3229978"; 
   NSString *longitude = @"-122.0321823";
  
   NSMutableURLRequest *request =[NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"http://www.mydomain.me/webservice.php"]];
   [request setHTTPMethod:@"POST"];
  
   NSString *post =[[NSString alloc] initWithFormat:@"latitude=%@longitude=%@submit",latitude,longitude];
   [request setHTTPBody:[post dataUsingEncoding:NSUTF8StringEncoding]];
  
  NSURLResponse *response;
          NSError *err;
          NSData *responseData = [NSURLConnection sendSynchronousRequest:request returningResponse:&amp;response error:&amp;err];
          }
  </code></pre>
  
  <p>and my PHP code is:</p>
  
  <pre><code>if (isset($_POST['submit']){
  
    //it doesn't get into this if statement
    $latitude = $_POST['latitude'];
    $longitude = $_POST['longitude'];
  
  }
  </code></pre>
  
  <p>The question is, why can't the PHP code get into the if statement? Where can I state the 'submit' through objective-C?</p>