title: Error sending data to PHP form
body: <p>I'm trying to send an email from my application with a PHP contact form, but the details can't be sent from the application for some reason. Please tell me what is the problem.. I've attached the the php form i'm using at the end.</p>
  
  <p>when I try to send an email using the web-browser and writing: <a href="http://www.bergerz.co.il/wp-content/themes/ecobiz/sendemailfromapp.php/?name=MYNAME&amp;subject=SUBJECT&amp;email=yositsa@gmail.com&amp;message=MESSAGE" rel="nofollow">http://www.bergerz.co.il/wp-content/themes/ecobiz/sendemailfromapp.php/?name=MYNAME&amp;subject=SUBJECT&amp;email=yositsa@gmail.com&amp;message=MESSAGE</a>, it's working perfectly.</p>
  
  <pre><code>-(IBAction)send:(id)sender
  {
      NSMutableURLRequest * request = [[NSMutableURLRequest alloc] init];
  
      NSString * urlString = [NSString stringWithFormat:@"http://www.bergerz.co.il/wp-content/themes/ecobiz/sendemailfromapp.php"];
  
      [request setURL:[NSURL URLWithString:urlString]];
      [request setHTTPMethod:@"REQUEST"];
  
      NSString * paramDataString = [NSString stringWithFormat:@"name=%@&amp;subject=%@&amp;email=%@&amp;message=%@",[txtName.text stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding],[txtSubject.text stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding],[txtEmail.text stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding],[txtMessage.text stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]];
  
      NSData*paramData = [paramDataString dataUsingEncoding:NSUTF8StringEncoding];
      [request setHTTPBody:paramData];
  
      NSURLResponse * response;
      NSError * error;
  
      NSData * aData = [NSURLConnection sendSynchronousRequest:request returningResponse:&amp;response error:&amp;error];//excute of data to the internet 
      NSString * requestData = [[NSString alloc] initWithData:aData encoding:NSUTF8StringEncoding];
      if ([requestData isEqualToString:[NSString stringWithFormat:@"sent"]])
      {
          lblStatus.hidden = NO;
          lblStatus.text = @"Message Sent..";
      }
      else if ([requestData isEqualToString:[NSString stringWithFormat:@"NO_NAME_ERROR"]])
      {
          lblStatus.hidden = NO;
          lblStatus.text = @"Name is too short";
      }
      else if ([requestData isEqualToString:[NSString stringWithFormat:@"NO_EMAIL_ERROR"]])
      {
          lblStatus.hidden = NO;
          lblStatus.text = @"Email is too short";
      }
      else if ([requestData isEqualToString:[NSString stringWithFormat:@"EMAIL_WRONG_ERROR"]])
      {
          lblStatus.hidden = NO;
          lblStatus.text = @"Email wrong error";
      }
      else if ([requestData isEqualToString:[NSString stringWithFormat:@"NO_MESSAGE_ERROR"]])
      {
          lblStatus.hidden = NO;
          lblStatus.text = @"Message is too short";
      }
      else if ([requestData isEqualToString:@"NULL"])
      {
          lblStatus.hidden = NO;
          lblStatus.text = @"EMPTY";
      }
      NSLog(@"request: %@",request);
      NSLog(@"requestData: %@",requestData);
      NSLog(@"aData: %@",aData);
  }
  </code></pre>
  
  <p>here is the php file: <a href="http://www.pastebin.com/BvaiMs04" rel="nofollow">http://www.pastebin.com/BvaiMs04</a></p>
  
  <p>I've edited the message to my latest code, still he isn't working.</p>