title: uploading image to 000webhost.com via android studio
body: <p>so im trying to connect my android studio to this web server (000webhost) but can't seem to upload it successfully, i think the problem is the path but i haven't found some examples online on how to connect to the file manager of the 000webhost</p>
  
  <p>connection.php
      
  
  <pre><code>header('Content-type : bitmap; charset=utf-8');
  
  if(isset($_POST["encoded_image"])){
  
      $encoded_image = $_POST["encoded_image"];
      $image_name = $_POST["image_name"];
  
      $decoded_string = base64_decode($encoded_image);
  
      $path = 'images/'.$image_name;
  
      $file = fopen($path,'wb');
  
      $is_written = fwrite($file,$decoded_string);
      fclose($file);
  
      if($is_written &gt; 0){
          $connection = mysqli_connect('localhost','id7794597_razzlesz','hahayz9090','id7794597_memes');
          $query = "INSERT INTO photos (name,path) values ('$image_name','$path');";
  
          $result = mysqli_query($connection, $query);
  
          if($result){
              echo "success";
              }else{
                  echo "failed";
              }
              mysqli_close($connection);
      }
  }
  </code></pre>
  
  <p>?></p>
  
  <p>btnUpload</p>
  
  <pre><code>btnUpload.setOnClickListener(new View.OnClickListener() {
      @Override
      public void onClick(View view) {
          StringRequest stringRequest = new StringRequest(Request.Method.POST, urlUpload, new Response.Listener&lt;String&gt;() {
              @Override
              public void onResponse(String response) {
  
              }
  
          }, new Response.ErrorListener() {
              @Override
              public void onErrorResponse(VolleyError error) {
  
  
              }
  
          }){
              @Override
              protected Map&lt;String, String&gt; getParams() {
                  Map&lt;String, String&gt; params = new HashMap&lt;&gt;();
                  String imageData = imageToString(bitmap);
                  String imgName = edtName.getText().toString();
                  params.put ("encoded_image", imageData);
                  params.put ("image_name", imgName);
  
                  return params;
              }
          };
          RequestQueue requestQueue = Volley.newRequestQueue(MainActivity.this);
          requestQueue.add(stringRequest);
          Toast.makeText(getApplicationContext(),"image uploaded!", Toast.LENGTH_LONG).show();
      }
  });
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/fT6BR.png" rel="nofollow noreferrer">my db</a></p>
  
  <p>what should i put on the path of the php? </p>