title: How to upload image taken from camera in android into MYSQL database
body: <p><strong>How to upload these images taken from camera into MySQL</strong></p>
  
  <p>I can take multiple images and These images shown in image view but i couldn't find a way       to upload them in to MySQL database. below is my code.</p>
  
  <p><strong>This is the solution class</strong></p>
  
  <pre><code>    public class solution extends Activity {
      static int count=1;
      ImageView iv;
      ImageView iv2;
      ImageView iv3;
      ImageView iv4;
      ImageView iv5;
  
  @Override protected void onCreate(Bundle savedInstanceState) {
      // TODO Auto-generated method stub
      super.onCreate(savedInstanceState);
      setContentView(R.layout.solution);
  
      iv=(ImageView) findViewById(R.id.image1);
      iv2=(ImageView) findViewById(R.id.image2);
      iv3=(ImageView) findViewById(R.id.image3);
      iv4=(ImageView) findViewById(R.id.image4);
      iv5=(ImageView) findViewById(R.id.image5);
  
      Button b=(Button) findViewById(R.id.click);
      b.setOnClickListener(new OnClickListener() {
  
          @Override
          public void onClick(View v) {
          Intent intent=new Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE);
          startActivityForResult(intent, 0);
  
          }
      });
  }
    @Override
    protected void onActivityResult(int requestCode, int resultCode, Intent data) {
      // TODO Auto-generated method stub
    super.onActivityResult(requestCode, resultCode, data);
    Bitmap bm=(Bitmap) data.getExtras().get("data");
    if(count==1){
  
   iv.setImageBitmap(bm);
    }
    if(count==2){
        iv2.setImageBitmap(bm);  
    }
    if(count==3){
        iv3.setImageBitmap(bm);  
    }
    if(count==4){
        iv4.setImageBitmap(bm);  
    }
    if(count==5){
        iv5.setImageBitmap(bm);  
    }
    count++;
  }
  }
  </code></pre>