title: Send json to php using ASIFormDataRequest
body: <p>I'm new in iPhone and I'm trying to convert NSMutable array to json string then send this string to php file using request,  and then print it again using respond to NSLog to ensure that it has been send successfully. So I wrote the following code in viewDidLoad</p>
  
  <pre><code>NSString *phpUrl = @"http://dt-works.com/eman/bookMarks.php";
  
  NSMutableArray *arrayKey = [[NSMutableArray alloc] initWithObjects:@"one", @"two", @"three", nil];
  NSMutableArray *arrayValue1 = [[NSMutableArray alloc] initWithObjects:@"1", @"2", @"3", nil]; 
  NSMutableArray *arrayValue2 = [[NSMutableArray alloc] initWithObjects:@"11", @"22", @"33", nil]; 
  
  NSDictionary *theReqDictionary1 = [NSDictionary dictionaryWithObjects:arrayValue1 forKeys:arrayKey];
  NSDictionary *theReqDictionary2 = [NSDictionary dictionaryWithObjects:arrayValue2 forKeys:arrayKey];
  
  NSMutableArray *myArray = [NSMutableArray arrayWithObjects:theReqDictionary1,theReqDictionary2, nil];
  
  NSString *jsonString = [myArray JSONRepresentation];
  
  NSLog(@"%@", jsonString);
  
  
  
   NSDictionary *questions = nil;
  NSURL *link = [NSURL URLWithString:[phpUrl stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]];
  ASIFormDataRequest *request = [ASIFormDataRequest requestWithURL:link];
  [request setPostValue:jsonString forKey:@"jsonString"];
  [request setTimeOutSeconds:120];
  [request setDelegate:self];
  NSError *error = [request2 error];
  [request2 startSynchronous];
  
  if (!error) { 
      NSData *response = [request responseData];
      NSString *json = [[NSString alloc] initWithData:response encoding:NSUTF8StringEncoding];
      questions = [json objectFromJSONString];
      NSLog(@"Data: %@", questions);
  
  } 
  </code></pre>
  
  <p>and the code in bookMarks.php is: </p>
  
  <pre><code>$handle = fopen('php://input','r');
  $jsonInput = $_POST['jsonString'];
  print_r($jsonInput);
  </code></pre>
  
  <p>but it gives me:</p>
  
  <pre><code>[{"one":"1","two":"2","three":"3"},{"one":"11","two":"22","three":"33"}]
  Data: (null)
  </code></pre>
  
  <p>and I want Data to be as: [{"one":"1","two":"2","three":"3"},{"one":"11","two":"22","three":"33"}]
  how to do this??</p>