title: Parse's REST API and PHP Curl error : {"code":201,"error":"missing user password"}
body: <p>I am getting user password missing error even i an using urlencode .. i have read many solutions also but couldn't resolve it .i am using form to get data from user and then use curl to create the user .
  plzz help</p>
  
  <p>here's my code </p>
  
  <p>$data = array();</p>
  
  <pre><code>    $data['username'] = $_POST['username'];
      $data['mobile'] = $_POST['mobile'];
      $data['password'] =  $_POST['password'];
      $data['email'] = $_POST['email']; 
  
      $post_str = '';
  
     foreach($data as $key=&gt;$val) 
          {
              $post_str .= urlencode($key).'='.urlencode($val).'&amp;';
          }
          echo $post_str = substr($post_str, 0, -1);
  
  
   $url = 'https://api.parse.com/1/users';  
  
   $appId = 'apikey';  
   $restKey = 'rest key';  
   $headers = array(  
     "Content-Type: application/json",  
     "X-Parse-Application-Id: " . $appId,  
     "X-Parse-REST-API-Key: " . $restKey  
   );  
  
  
  $ch = curl_init();
  
  curl_setopt($ch, CURLOPT_URL, $url );
  curl_setopt($ch, CURLOPT_POST, TRUE);
   curl_setopt($ch, CURLOPT_FRESH_CONNECT, FALSE);
  curl_setopt($ch,CURLOPT_HTTPHEADER,$headers);
  curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($post_str) );
  
  curl_setopt($ch,CURLOPT_SSL_VERIFYPEER, false); 
  curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
  
  
  $result = curl_exec($ch);
  
  curl_close($ch);
  echo $result;
  </code></pre>