title: PHP not receiving post data from my iPhone simulator using AFNetworking
body: <p>I tried to send post data from my iPhone simulator using afnetworking. I tried to check the php page if it receives the data. But unfortunately, it's not receiving any post data. I tried to use var_dump($_POST) but it returns an empty array. Here's my code:</p>
  
  <p>iOS Code for sending data to PHP (ViewController.h):</p>
  
  <pre><code>- (IBAction)onSend:(id)sender {
  
      NSURL *url = [NSURL URLWithString:@"http://localhost/sample/"];
      AFHTTPClient *client = [[AFHTTPClient alloc] initWithBaseURL:url];
  
      NSDictionary *params = [NSDictionary dictionaryWithObjectsAndKeys:firstnameTextField.text, @"firstname", lastnameTextField.text, @"lastname",nil];
  
      [client postPath:@"sample.php" parameters:params success:^(AFHTTPRequestOperation *operation, id responseObject) {
          UIAlertView *succesAlert = [[UIAlertView alloc] initWithTitle:@"Success" message:@"Post Success" delegate:self cancelButtonTitle:@"OK" otherButtonTitles:nil, nil];
          [succesAlert show];
      } failure:^(AFHTTPRequestOperation *operation, NSError *error) {
  
      }];
  }
  </code></pre>
  
  <p>PHP Code (sample.php):</p>
  
  <pre><code>&lt;?php
      if(isset($_POST["firstname"]) &amp;&amp; isset($_POST["lastname"]))
      {
          $fname = $_POST["firstname"];
          $lname = $_POST["lastname"];
          echo $fname."&lt;br/&gt;";
          echo $lname;
      }
  
      echo var_dump($_POST);
  ?&gt;
  </code></pre>