title: Sending Post Request to a server
body: <p>I have this php code.</p>
  
  <pre><code>&lt;?php  
         $users = $this-&gt;Session-&gt;read("user");
         $varFName = $users['User']['first_name'];
         $varLName = $users['User']['last_name'];
         $message = "Hello,
   I would like to invite you to Clicksays! ".$varFName." ".$varLName;
         echo $this-&gt;Form-&gt;create('User', array('id' =&gt; 'sendEmailRequest', 'style'=&gt;'padding : 0px;', 'url' =&gt; array('controller' =&gt; 'Contacts', 'action' =&gt; 'addEmailRequest')));
         echo $this-&gt;Form-&gt;input('Email', array('id' =&gt; 'email', "size"=&gt;"40"));
         echo $this-&gt;Form-&gt;textarea("Message", array("type"=&gt;"textarea", "id"=&gt;"PreviewEmail", "style"=&gt;"display:none;","rows"=&gt;"5", "cols"=&gt;"45", "value"=&gt;$message));
         echo $this-&gt;Form-&gt;button('Preview and edit invitation Clickup', array("id" =&gt; "butInvite", "type"=&gt;"button"));
         echo $this-&gt;Form-&gt;button('Send invitation Clickup', array('id' =&gt; 'butSendInvitation',  'type'=&gt;'submit'));
         echo $this-&gt;Form-&gt;end(); ?&gt;
  </code></pre>
  
  <p>Now it accepts the array of data for user,email and message:</p>
  
  <pre><code>NSURL *URL = [NSURL URLWithString:@"myLink"];
  NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:URL cachePolicy:NSURLRequestReloadIgnoringLocalCacheData timeoutInterval:6.0];
  [request setHTTPMethod:@"POST"];
  NSURLConnection *connection = [NSURLConnection connectionWithRequest:request delegate:self];
      [connection start];
  </code></pre>
  
  <p>Now I am pretty sure I need to put the array as the HTTP body, but I don't know how. I am not a web guy, and know little about the web programming and the methods.</p>
  
  <p>How can I pass the details? It does not work without it, and post the error to enter the details for the user, that code exist in php too.</p>