android HttpUrlconnection post方法不起作用

I have mysql table "nhanvien", which has three filed (id,maso, hoten) I want to insert to table nhanvien. I have php code.

      /*
       * Following code will create a new product row
       * All product details are read from HTTP Post Request
       */
       function customError($errno, $errstr) {
          echo "<b>Error:</b> [$errno] $errstr";
       }

       //set error handler
       set_error_handler("customError");

       // array for JSON response
       $response = array();

       //connect to database
       $link = mysqli_connect("localhost", "root", "", "nhanvien");

       /* check connection */
       if (mysqli_connect_errno()) {
          printf("Connect failed: %s
", mysqli_connect_error());
          exit();
       }

       // check for required fields
      if (isset($_POST['id']) && isset($_POST['maso']) &&  isset($_POST['hoten'])) {


       $id=$_POST['id'];
       $Maso=$_POST['maso'];
       $Hoten=$_POST['hoten'];


       // mysql inserting a new row
 $result = mysqli_query($link,"INSERT INTO nhanvien(id, Maso,Hoten)  VALUES('$id', '$Maso', '$Hoten')");

// check if row inserted or not
if ($result) {
    // successfully inserted into database
    $response["success"] = 1;
    $response["message"] = "nhanvien successfully created.";

    // echoing JSON response
    echo json_encode($response);
} else {
    // failed to insert row
    $response["success"] = 0;
    $response["message"] = "Oops! An error occurred.";

    // echoing JSON response
    echo json_encode($response);
}
} else {
// required field is missing
$response["success"] = 0;
$response["message"] = "Required field(s) is missing";

// echoing JSON response
echo json_encode($response);
}
 ?>

  <html>
  <body>

    <form action="<?php $_PHP_SELF ?>" method="POST">
       id: <input type="text" name="id" />
       maso: <input type="text" name="maso" />
       hoten: <input type="text" name="hoten" />

       <input type="submit" />
  </form>

  </body>
  </html>

My test success.But : I have php file : creat_nhanvien.php

       <?php

      /*
       * Following code will create a new product row
       * All product details are read from HTTP Post Request
       */
       function customError($errno, $errstr) {
          echo "<b>Error:</b> [$errno] $errstr";
       }

       //set error handler
       set_error_handler("customError");

       // array for JSON response
       $response = array();

       //connect to database
       $link = mysqli_connect("localhost", "root", "", "nhanvien");

       /* check connection */
       if (mysqli_connect_errno()) {
          printf("Connect failed: %s
", mysqli_connect_error());
          exit();
       }

       // check for required fields
      if (isset($_POST['id']) && isset($_POST['maso']) &&  isset($_POST['hoten'])) {


       $id=$_POST['id'];
       $Maso=$_POST['maso'];
       $Hoten=$_POST['hoten'];


       // mysql inserting a new row
 $result = mysqli_query($link,"INSERT INTO nhanvien(id, Maso,Hoten)  VALUES('$id', '$Maso', '$Hoten')");

// check if row inserted or not
if ($result) {
    // successfully inserted into database
    $response["success"] = 1;
    $response["message"] = "nhanvien successfully created.";

    // echoing JSON response
    echo json_encode($response);
} else {
    // failed to insert row
    $response["success"] = 0;
    $response["message"] = "Oops! An error occurred.";

    // echoing JSON response
    echo json_encode($response);
}
} else {
// required field is missing
$response["success"] = 0;
$response["message"] = "Required field(s) is missing";

// echoing JSON response
echo json_encode($response);
}
 ?>

I have a code android.

       try {
            Map<String, Object> para = new LinkedHashMap<>();
            para.put("id", "10");
            para.put("maso", "A10");
            para.put("hoten", "nguyen van u");
            System.out.println(para);

            StringBuilder postData = new StringBuilder();
            for (Map.Entry<String, Object> param : para.entrySet()) {
                if (postData.length() != 0) postData.append('&');
                postData.append(URLEncoder.encode(param.getKey(), "UTF-8"));
                postData.append('=');
                       poststData.append(URLEncoder.encode(String.valueOf(param.getValue()), "UTF-8"));
            }
            String myPara = postData.toString();

            byte[] postDataBytes = postData.toString().getBytes("UTF-8");
            //System.out.println(postDataBytes.toString().getBytes());

            URL murl = new URL(url);
            HttpURLConnection httpURLConnection =   HttpURLConnection)murl.openConnection();

            //httpURLConnection.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");
            httpURLConnection.setRequestProperty("Content-Type", "multipart/form-data");


            httpURLConnection.setRequestProperty("Content-Length", "" + Integer.toString(postDataBytes.toString().getBytes().length));
            httpURLConnection.setRequestMethod("POST");
            httpURLConnection.setDoOutput(true);
            //httpURLConnection.connect();
            DataOutputStream out = new DataOutputStream(httpURLConnection.getOutputStream());
            //httpURLConnection.getOutputStream().write(postDataBytes.toString().getBytes());
            out.writeBytes(postDataBytes.toString());
            out.flush();
            out.close();

        }catch (Exception e) {
            e.printStackTrace();
        }

A code not work.IT seem i cannot send parameter to php file or? Can you help me, please. thank you very, very, very....much. Sorry, i'm not good at english.