title: Problem using NSURLRequest to POST data to server
body: <p>I create an <code>NSURLRequest</code> to post my data in the iPhone application to a server to proceed the PHP script. My PHP script is look like this.</p>
  
  <pre><code>&lt;?php
      $name = $_POST['name'];
      $email = $_POST['email'];
  
      $link = mysql_connect("localhost", "fffasfdas","Nfdsafafs") or die ("Unable to connect to database.");
      mysql_select_db("muradsbi_mydatabase") or die ("Unable to select database.");
  
      $sqlstatement= "INSERT INTO dbname (name,email) VALUES ('$name','$email')";
      $newquery = mysql_query($sqlstatement, $link);
      echo 'thanks for your register';
  ?&gt;
  </code></pre>
  
  <p>and my <code>NSURLRequst</code> is created like below.</p>
  
  <pre><code>NSString *myRequestString = @"&amp;name=Hello%20World&amp;email=Ohai2u";
  NSData *myRequestData = [NSData dataWithBytes: [myRequestString UTF8String] length: [myRequestString length]];
  NSMutableURLRequest *request = [[NSMutableURLRequest alloc] initWithURL: [NSURL URLWithString: @"http://www.google.com/"]];
  [request setHTTPMethod: @"POST"];
  [request setHTTPBody: myRequestData];
  NSData *returnData = [NSURLConnection sendSynchronousRequest: request returningResponse: nil error: nil];
  </code></pre>
  
  <p>However, this site is unable to get the data from this application and save it to the database, but I know it was connected succussfully because my application is able to get the response data from the server. I don't know whether my variable name is declared in the wrong way or others issues. How can I fix it?</p>