title: cant read field value and exit if statement
body: <pre><code>&lt;?php 
      require_once 'configuration.php';
  
      $response = array();
   
      if($_POST['writ_num'] &amp;&amp; $_POST['writ_title'] &amp;&amp; $_POST['writ_content'] &amp;&amp; $_POST['writ_date']){
          $writ_num = isset($_POST[&quot;writ_num&quot;]) ? $_POST[&quot;writ_num&quot;] : &quot;&quot;;
          $writ_title = isset($_POST[&quot;writ_title&quot;]) ? $_POST[&quot;writ_title&quot;] : &quot;&quot;;
          $writ_content = isset($_POST[&quot;writ_content&quot;]) ? $_POST[&quot;writ_content&quot;] : &quot;&quot;;
          $writ_date = date(&quot;Y-m-d H:i:s&quot;);
          
          $stmt = $conn-&gt;prepare(&quot;INSERT INTO 'test_tbl'('writ_num', 'writ_title', 'writ_content', 'writ_date') VALUES (?,?,?,?)&quot;);
          $stmt-&gt;bind_param(&quot;issi&quot;,$writ_num,$writ_title,$writ_content, $writ_date);
          if($stmt-&gt;execute() == TRUE){
              $response['error'] = false;
              $response['message'] = &quot;product created successfully!&quot;;
          } else{
              $response['error'] = true;
              $response['message'] = &quot;failed\n &quot;.$conn-&gt;error;
          }
      } else{
          $response['error'] = true;
          $response['message'] = &quot;Insufficient parameters&quot;;
      }
      echo json_encode($response);
  ?&gt;
  </code></pre>
  <p>Register.java</p>
  <pre><code>public class Register extends AppCompatActivity {
      private Button rewrite_button;
      private EditText title_et, content_et;
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_register);
  
          title_et=findViewById(R.id.title_et);
          content_et=findViewById(R.id.content_et);
  
          rewrite_button = findViewById(R.id.rewrite_button);
          rewrite_button.setOnClickListener(new View.OnClickListener() {
              @Override
              public void onClick(View view) {
                  String writ_title = title_et.getText().toString();
                  String writ_content = content_et.getText().toString();
  
                  if (TextUtils.isEmpty(writ_title)) {
                      title_et.setError(&quot;Please enter Title&quot;);
                  } else if (TextUtils.isEmpty(writ_content)) {
                      content_et.setError(&quot;Please enter Title&quot;);
                  } else {
                      // calling method to add data to Firebase Firestore.
                      addDataToDatabase(writ_title, writ_content);
                  }
              }
          });
      }
  
      private void addDataToDatabase(String writ_title, String writ_content) {
  
          // url to post our data
          String url = &quot;http://capstudyapp.dothome.co.kr/Board.php&quot;;
  
          // creating a new variable for our request queue
          RequestQueue queue = Volley.newRequestQueue(Register.this);
  
          // on below line we are calling a string
          // request method to post the data to our API
          // in this we are calling a post method.
          StringRequest request = new StringRequest(Request.Method.POST, url, new com.android.volley.Response.Listener&lt;String&gt;() {
              @Override
              public void onResponse(String response) {
                  Log.e(&quot;TAG&quot;, &quot;RESPONSE IS &quot; + response);
                  try {
                      JSONObject jsonObject = new JSONObject(response);
                      // on below line we are displaying a success toast message.
                      Toast.makeText(Register.this, jsonObject.getString(&quot;message&quot;), Toast.LENGTH_SHORT).show();
                  } catch (JSONException e) {
                      e.printStackTrace();
                  }
                  // and setting data to edit text as empty
                  title_et.setText(&quot;&quot;);
                  content_et.setText(&quot;&quot;);
              }
          }, new com.android.volley.Response.ErrorListener() {
              @Override
              public void onErrorResponse(VolleyError error) {
                  // method to handle errors.
                  Toast.makeText(Register.this, &quot;Fail to get response = &quot; + error, Toast.LENGTH_SHORT).show();
              }
          }) {
              @Override
              public String getBodyContentType() {
                  // as we are passing data in the form of url encoded
                  // so we are passing the content type below
                  return &quot;application/x-www-form-urlencoded; charset=UTF-8&quot;;
              }
  
              @Override
              protected Map&lt;String, String&gt; getParams() {
  
                  // below line we are creating a map for storing
                  // our values in key and value pair.
                  Map&lt;String, String&gt; params = new HashMap&lt;String, String&gt;();
  
                  // on below line we are passing our
                  // key and value pair to our parameters.
                  params.put(&quot;writ_title&quot;, writ_title);
                  params.put(&quot;writ_content&quot;, writ_content);
  
                  // at last we are returning our params.
                  return params;
              }
          };
          // below line is to make
          // a json object request.
          queue.add(request);
      }
  }
  </code></pre>
  <p>I am developing apps using php and Android studio. An error occurred while connecting php. I think it's a problem to get out without going around the if statement. I think there is no problem with the code, so can you tell me what the problem is? It's not a matter of the number of fields because you choose and enter the field value, is it?</p>
  <pre><code>{&quot;error&quot;:true,&quot;message&quot;:&quot;Insufficient parameters&quot;} &lt; error is here
  </code></pre>