Hii i trying to upload a image to the Mysql database, and the image had been uploaded but i not sure whether I doing it correct or not.
Here is my code
public void onClick(View v) {
String name = ""+etName.getText().toString();
String age = ""+etAge.getText().toString();
String email = ""+etEmail.getText().toString();
String img_str = ""+etImage.getImageAlpha();
List<NameValuePair> nameValuePairs = new ArrayList<NameValuePair>(1);
nameValuePairs.add(new BasicNameValuePair("name", name));
nameValuePairs.add(new BasicNameValuePair("age", age));
nameValuePairs.add(new BasicNameValuePair("email", email));
nameValuePairs.add(new BasicNameValuePair("image_insert", img_str));
String img_str = ""+etImage.getImageAlpha(); Am i doing it correctly for this part?
Aucun commentaire:
Enregistrer un commentaire