title: Objective-C How to upload String with using AFNetwork
body: <p>I use AFNetwork to upload photo and string(I convert uitextview to string) to my server and save in database but I don't know to use AFNetwork to upload string but I use it to upload my photo it works this is my php code to use with viewcontroller</p>
  
  <pre><code>&lt;?php
  include(“connect.php");
  $uploaddir = "post_comment/original/";      //Uploading to same directory as PHP file
  $file = basename($_FILES['userfile']['name']);
  $uploadFile = $file;
  $randomNumber = rand(0, 99999);
  $newName = $uploaddir . $randomNumber . $uploadFile;
  $comment_text = nl2br($_POST['comment']);
  $post_no = $_POST['post_no'];
  $mem_slug = $_POST['id'];
  $timest = date("Y-m-d H:i:s");
  echo  "it is: ".$file;
  
  
  if (is_uploaded_file($_FILES['userfile']['tmp_name'])) {
      echo "Temp file uploaded. \r\n";
  } else {
      echo "Temp file not uploaded. \r\n";
  }
  
  if ($_FILES['userfile']['size']&gt; 3000000) {
      exit("Your file is too large.");
  }
  
  
  if(copy($_FILES['userfile']['tmp_name'],$newName)){
      $sql3 = $conn-&gt;prepare("INSERT INTO `post_comment`(`comment_id`,`post_id`,`member_id`,`comment`,`image`,`status`,`timestp`) VALUES('',:postid,:member,:comment,:image,'1',:timestp)");
      $sql3 -&gt;bindValue(':postid',$post_no);
      $sql3 -&gt;bindValue(':member',$mem_slug);
      $sql3 -&gt;bindValue(':comment',$comment_text);
      $sql3 -&gt;bindValue(':image',$newName);
      $sql3 -&gt;bindValue(':timestp',$timest);
      $sql3 -&gt;execute();
  }
      echo "upload finished";
  ?&gt;
  </code></pre>
  
  <p>Viewcontroller.m</p>
  
  <pre><code>NSString *comment = _commentText.text;
  NSDictionary *data= @{@"post_id":urlpost,@"member_id":member_id,@"comment":self.commentText.text};
      [manager POST:@"http://www.mysiteurl.com/member/comment_upload2.php"
         parameters:data constructingBodyWithBlock:^(id&lt;AFMultipartFormData&gt; formData)
       {
           [formData appendPartWithFileData:UIImageJPEGRepresentation(self.image, 100) name:@"userfile" fileName:@"img.jpg" mimeType:@"image/jpg"];
       }
            success:^(AFHTTPRequestOperation *operation, id responseObject)
       {
           NSString* str = [[NSString alloc] initWithData:responseObject encoding:NSUTF8StringEncoding];
           NSLog(@"response is :  %@",str);
       }
            failure:^(AFHTTPRequestOperation *operation, NSError *error)
       {
           NSLog(@"Error: %@ *****", error);
       }];
  }
  </code></pre>