Android Upload Image to Server Using PHP MySQL

Hello friends, welcome to our new tutorial, in this android tutorial we will create a simple Android Upload Image to Server App using PHP and MySQL.

Follow Updated Tutorial from this Link
Android Upload Image using Android Upload Service

In this tutorial we will upload small image files from android to server. If need to upload larger files like a captured video check this tutorial

Android Upload Video to Server using PHP

If you want to see what exactly we will be creating in this Android Upload Image to Server app then you can see this video demonstration first.

Android Upload Image to Server Video Demonstration

If you liked the demonstration of Android Upload Image to Server App then go ahead to know how you can do this. Lets start creating our Android Upload Image to Server Project.

This Android Upload Image to Server is having two parts

  1. PHP MySQL
  2. Android Studio

Lets start with PHP MySQL for your Android Upload Image to Server app.

Android Upload Image to Server – PHP MySQL Part

  • I am using hostinger hosting as my web server.
  • So go to your hosting accounts PhpMyAdmin and create a new table.
  • I have created the following table
android upload image to server
Android upload image to server – Database
  • Now we need to create a php script for our database connection
  • Create a new file named dbConnect.php and write the following code

  • Now we need one more php script to get and save our image sent from android device
  • Create a new file upload.php and write the following code

  • Now upload both the files to your hosting account
  • We need the address of upload.php file
  • In my case the address of my upload.php is -> http://simplifiedcoding.16mb.com/ImageUpload/upload.php

Android Upload Image to Server – The Android Part

  • Open android studio and create a new android project. (I have created ImageUploadSample)
  • Firstly we will create a new class to handle our Http Request
  • Right click on your package name and create a new java class (I created RequestHandler.java)
  • Write the following code

  • In activity_main.xml we have to create the following layout
android upload image to server
Android Upload Image to Server
  • For creating the above layout you can use the following xml code

  • Now come to MainActivity.java file
  • First we will declare some variables

  • Inside onCreate method we will initialize our components

  • As you can see we have added setOnClickListener to the buttons.
  • So now come to your onClick method and write the following code

  • Here we have two methods showFileChooser() this method will show the gallery from where user can choose image to upload.
  • When the user will choose an Image to upload, then after selection we will show that image to the ImageView we created in our main layout.
  • These two methods will do all the require things

  • Now we have the Image which is to bet uploaded in bitmap.
  • We will convert this bitmap to base64 string
  • So we will create a method to convert this bitmap to base64 string

  • Now finally create uploadImage() method

  • Now thats it for Android Image Upload to Server. You can see the final complete code below for MainActivity.java

So thats it for our Android Upload Image to Server app. In the next part of Android Upload Image to Server app we will see how we can fetch the uploaded images. You can also download the source code of this Android Upload Image to Server app from the link given below.

Android Upload Image to Server – Download Source Code

[wp_ad_camp_1]

Next Part –  Download Image from Server using PHP MySQL.

184 thoughts on “Android Upload Image to Server Using PHP MySQL”

  1. First of all Thanks for posting this!
    Can you help me with this I am getting “Error Registering ” as a toast when i try to Upload Images!

    loading.dismiss();
    Toast.makeText(getApplicationContext(),s,Toast.LENGTH_LONG).show();

    Where I am Wrong?

    Reply
  2. Thanks Belal for the tutorial, l also have same error “error registering” and for public String sendGetRequest(String uri) for “sendGetRequest” is says not in use?

    Reply
    • Actually this method sendGetRequest will be used when we fetch the uploaded image.. but in this part I did not cover fetching image.. So when I will publish the next part to fetch image from server we will use this method.. You can check by downloading my source code.. it is working correctly

      Reply
  3. Awesome. It’s working great. Is there any way I can upload tags or some other metadata to go in another column in the database? I saw a String MY_MESSAGE. Is that for another data field in a future tutorial? I’d like to be able to tag the pictures, dog, cat, girl, etc and then search the database by tag. Thanks again. I’m looking forward to your next tutorial.

    Reply
  4. Hello,
    I try your tutorial and I have one problem, I’am getting “Error Registering ” . I must upload image wich I take my mobile phone. What I sholud do? I want take a picture and upload to server.
    Can You help me?

    Look forward to hearing from you. Thank you very much!

    Reply
    • If your images are so large in size then you should not upload it to mysql database.. rather store the path of the image in mysql database in store image in a particular directory…

      Try changing the datatype from blob to long blob it will support larger images

      Reply
      • I changed to long blob and still I have the same problem. Ok, what I must change in php scrpit to save image in directory on my server?
        Thank you very much!

        Reply
      • I want tu upload picture and two string’s to mysql, what and where I can must change?
        Can I counting on your help?
        I’m looking forward to hearing from you.

        Reply
  5. Why does the app crash if in case, user along with image sends text to server and chooses at a instance to send only the text i.e. if no image is selected. How to make it optional to send image with text or only text?

    Reply
  6. Belal,
    That`s a great tutorial! Much better than the official one.
    I have applied every single step and run the app on my phone (Samsung Galaxy s4). But I might be missing something since I have the following problem: 1 – GUI shows as expected, 2 – Click on choose image button, 3 – Select an image from the gallery, 4 – App stops running. The error message on the console is: java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=1, result=-1, data=Intent { dat=content://media/external/images/media/27997 (has extras) }} to activity {com.example.h130145.imageuploadsample/com.example.h130145.imageuploadsample.MainActivity}: java.lang.SecurityException: Permission Denial: reading com.android.providers.media.MediaProvider uri content://media/external/images/media/27997 from pid=1319, uid=10061 requires android.permission.READ_EXTERNAL_STORAGE, or grantUriPermission()
    Looks like there is some kind of permission issue but I could not figure out exactly where it is. Any idea what is going wrong? Thanks in advance!!!

    Reply
  7. hiii Belal,

    I am following your code to upload image to server using php,mysql . but I’m getting ‘error uploading image’ message when i run upload.html file. all the php file are from your google drive.. what should I do? please help me!!

    Reply
  8. hey.. i find out where i’m wrong.. but now when i try to open that image from wamp server..it download in BIN format.. what should i do to opn it in .jpeg…please help me!!!

    Reply
  9. Hi Bilal, this tutorial is very helpful for me But i have an issue with this can u plzzz help me??

    Image uploading successfully While fetching the images some images are invisible because of its size and dimensions. Can u plz help me??

    Reply
  10. Hi, thanks for your great tutorial, I have hard time to insert both string and bitmap together into the mysql, can you please do a full tutorial on how to do it? I’m confused on the string params and my bitmap cant be use.

    Reply
  11. Dear Belal Khan, thanks for your tutorial. I have facing some problem here. I created a same table with yours in my web hosting server and using your sample application to upload and retrieve the image. However, i found out that the picture i uploaded to database is not same with the original picture, some part is missing as white color presented in the picture. You can check it out at the following link (“http://tarucassist.comli.com/getImage.php?id=1 ).

    The details of the picture is
    width: 720
    height: 1280
    file size: 404kb

    another example which is successfully display whole picture: http://tarucassist.comli.com/getImage.php?id=3
    However, the size of this picture is smaller than the first 1 which details shows as below:
    width: 250
    height: 250
    file size 42.0kb

    may i ask it is the size problem or ?

    Reply
  12. Hi,
    Great tutorial. I do have a question .
    Why do you have to upload the image in bitmap and convert to base64 string.
    Using basic html and php as the code below through the computer browser I can upload any image in its native format.

    Can’t Android handle the raw picture file format such as *.png or *.jpg etc?

    Standard upload code below:

    Upload Data

    File:

    <?php

    // connect to database
    mysql_connect("localhost","myusername","mypassword") or die(mysql_error());

    mysql_select_db("SharperApp_1") or die(mysql_error());

    //file properties
    $file = $_FILES['Image_1']['tmp_name'];

    if (!isset($file))
    echo "Please select an Image.";
    else
    {
    $image = addslashes(file_get_contents($_FILES['Image_1']['tmp_name']));
    $image_name = addslashes($_FILES['Image_1']['name']);
    $image_size = getimagesize($_FILES['Image_1']['tmp_name']);

    if ($image_size==FALSE)
    echo "That's not an image.";
    else
    {
    if (!$insert = mysql_query("INSERT INTO Inspection_Data VALUES ('','$image_name','','','','','','$image')"))
    echo "Problem uploading image.";
    else
    {
    $lastid = mysql_insert_id();
    echo"Image Uploaded.Your image:”;
    }

    }
    }
    ?>

    Reply
    • No you can’t send image directly from android device to server… Though there is an option available for multipart http request I will try to post a tutorial for that as well

      Thank You

      Reply
  13. Nice tutorial.

    I’m trying to do this, but using restful services. In Android side I use Retrofit, in server side, I use slim.

    I think this make everything a little easier. I’m just fighting with the php code. I receive the image, but I want to save it in a concret directory in server.

    Reply
  14. Dear Belal,
    I have tried your code, both html and Android. Html is working fine, but Android give result 0 Byte in my SQL. Do you have any suggestion?

    Reply
  15. Dear sir, I have trouble in uploading image to server according to your source.when choose image, message ” Unfortunately, ImageUpload has stopped.
    How to solve it. Please sir.
    Sincerely.
    Thura

    Reply
  16. I can see you upload the image by convert to bitmap and then to base64. If I want to upload files like .pdf, I’ll just have to skip the bitmap conversion, and make it to base64 before upload. is that true? some say “file is just a file anyway so it will work” so I want to confirm it from you.

    Reply
  17. great work awesome thank you for this.
    I would like to know how we can upload multiple images to the server at one shot.
    Please help me with this.

    Reply
  18. Thanks alot !!!!!!
    OMG this is what i am looking for 😀
    this is the only tutorial that shows you how to do it on an actual server not wamp server
    any chance you can add uploading a comment (text) with the string like a tag or so ??
    it would be appreciated :))
    god bless you

    Reply
  19. Hi belal,
    can you please provide me a tutorial for getting all near by places? like restaurants,hospital in list view. just like food panda application. i will be very thankful to you.. 🙂

    Reply
  20. nice tutorial sir.. but i want to ask, hope you can help me… i i want to save strings and bitmap in one database.. what is the code ? since if bitmap you use “doInBackground(Bitmap… params)” and for string, “doInBackground(String…params)”, so how can i combine bitmap and string to save in database ? what is the code ? thank you sir 🙂

    Reply
  21. Bro its been over a week and its really irritating im using 000webhost and i have tried a lot on this but all i am getting is PHP Error.

    Reply
  22. Hi , Belal Khan
    i used all your upload code but occur this error.i am using byethost.

    W/EGL_emulation: eglSurfaceAttrib not implemented
    W/OpenGLRenderer: Failed to set EGL_SWAP_BEHAVIOR on surface 0xabe7fb00, error=EGL_SUCCESS
    E/Surface: getSlotFromBufferLocked: unknown buffer: 0xab75d510

    can u teach me how to solve this ?

    A million thanks =)

    Reply
  23. Hi,
    thank you for the helpful tutorial!!

    I would really appritiate if you could help me-
    each time I try to upload image I get the ‘Error Uploading Image’ error [from the php file],

    how can I solve that???

    thanks!!

    Reply
  24. Hi Belal,
    I am try to change url “http://192.168.1.41/ImageUpload/upload.php” for my local System. and Changed Php Script also. But Image not Uploaded and Shows empty Toast.
    My Logcats Shows the Following Error,

    java.net.ConnectException: failed to connect to /192.168.1.41 (port 80) after 15000ms: isConnected failed: EHOSTUNREACH (No route to host)

    W/System.err: at libcore.io.IoBridge.isConnected(IoBridge.java:238)
    W/System.err: at libcore.io.IoBridge.connectErrno(IoBridge.java:171)
    W/System.err: at libcore.io.IoBridge.connect(IoBridge.java:122)
    W/System.err: at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:183)
    W/System.err: at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:456)
    W/System.err: at java.net.Socket.connect(Socket.java:882)
    W/System.err: at com.android.okhttp.internal.Platform.connectSocket(Platform.java:139)
    W/System.err: at com.android.okhttp.Connection.connect(Connection.java:148)
    W/System.err: at com.android.okhttp.internal.http.HttpEngine.connect(HttpEngine.java:276)
    W/System.err: at com.android.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:211)
    W/System.err: at com.android.okhttp.internal.http.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:373)
    W/System.err: at com.android.okhttp.internal.http.HttpURLConnectionImpl.connect(HttpURLConnectionImpl.java:106)
    W/System.err: at com.android.okhttp.internal.http.HttpURLConnectionImpl.getOutputStream(HttpURLConnectionImpl.java:208)
    W/System.err: at net.simplifiedcoding.imageuploadsample.RequestHandler.sendPostRequest(RequestHandler.java:59)
    W/System.err: at net.simplifiedcoding.imageuploadsample.MainActivity$1UploadImage.doInBackground(MainActivity.java:118)
    W/System.err: at net.simplifiedcoding.imageuploadsample.MainActivity$1UploadImage.doInBackground(MainActivity.java:92)
    W/System.err: at android.os.AsyncTask$2.call(AsyncTask.java:288)
    W/System.err: at java.util.concurrent.FutureTask.run(FutureTask.java:237)
    W/System.err: at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231)
    W/System.err: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
    W/System.err: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
    W/System.err: at java.lang.Thread.run(Thread.java:818)
    W/System.err: Caused by: android.system.ErrnoException: isConnected failed: EHOSTUNREACH (No route to host)
    W/System.err: at libcore.io.IoBridge.isConnected(IoBridge.java:223)

    Reply
  25. Hi.,

    Please Give me the Php Script. I’m using MySql db. I Cant acces Server. Logcat shows EHOSTUNREACH (No route to host) Error.
    Please Help me.

    Reply
  26. Great Tutorial!!! My Problem is that the string response inside the toast generated from the uploadImage Async Task is empty and the image is never uploaded to my hostinger mysql database…. The image is taken from camera and it is about 1.5MB. Please Help….

    Reply
  27. I have a login form where the user provide Name, mobile no. and Uploads image. I have implemented your example for uploading image but when i select the image i get an error that ” java.lang.RuntimeException: Unable to resume activity {com.example.moon.vendor/com.example.moon.vendor.MainActivity}: java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=1, result=-1, data=Intent { dat=content://media/external/images/media/55851 (has extras) }} to activity {com.example.moon.vendor/com.example.moon.vendor.MainActivity}: java.lang.NullPointerException”. What can be possible reason for this. please help.

    Reply
  28. sir i am facing one problem with php script my file gets uploaded but showing message unsucessful to upload and also it is not downloading files from server neither it is showing it with id=1 or id=2 as you have shown in the example,i done exactly same please help me

    Reply
  29. hey, i am working on this with postgresql database. but am getting error in android part.

    Error:(141, 55) error: package net.simplifiedcoding.imageuploadsample does not exist
    Error:(141, 118) error: package net.simplifiedcoding.imageuploadsample does not exist
    Error:Execution failed for task ‘:app:compileDebugJavaWithJavac’.
    > Compilation failed; see the compiler error output for details.
    Information:BUILD FAILED

    Reply
  30. I’m getting this error. Please Resolve this . 🙂

    02-26 10:01:01.259 10396-11867/com.example.nitish.uploadimage E/AndroidRuntime: FATAL EXCEPTION: AsyncTask #1
    Process: com.example.nitish.uploadimage, PID: 10396
    java.lang.RuntimeException: An error occured while executing doInBackground()
    at android.os.AsyncTask$3.done(AsyncTask.java:300)
    at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:355)
    at java.util.concurrent.FutureTask.setException(FutureTask.java:222)
    at java.util.concurrent.FutureTask.run(FutureTask.java:242)
    at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
    at java.lang.Thread.run(Thread.java:841)
    Caused by: java.lang.NullPointerException
    at android.graphics.Bitmap.createScaledBitmap(Bitmap.java:602)
    at com.example.nitish.uploadimage.MainActivity.getStringImage(MainActivity.java:79)
    at com.example.nitish.uploadimage.MainActivity$1UploadImage.doInBackground(MainActivity.java:112)
    at com.example.nitish.uploadimage.MainActivity$1UploadImage.doInBackground(MainActivity.java:89)
    at android.os.AsyncTask$2.call(AsyncTask.java:288)
    at java.util.concurrent.FutureTask.run(FutureTask.java:237)
    at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231) 
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112) 
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587) 
    at java.lang.Thread.run(Thread.java:841) 

    Reply
  31. can I do this tutorial for uploading file doc or pdf from my Android project and download it also or its just for images plz help T_T

    Reply
  32. process is displaying “uploading image” but image is not uploading .
    it doesn’t toast anything ..Toast is blank

    Can you please help me with it

    Reply
    • He forgot to define the “$con” variable. That’s what is probably giving the problem. it’s the varibale that does the actual connection to the database.
      I have another php class that has a function to connect:

      conn = new mysqli(DB_HOST, DB_USER, DB_PASSWORD, DB_DATABASE);

      // return database handler
      return $this->conn;
      }
      }
      ?>

      then in the above php file I defined $con as follows:
      // connecting to db
      $db = new DB_Connect();

      //sql connection
      $con = $db ->connect();

      Reply
      • sorry this is the other php file in full

        conn = new mysqli(DB_HOST, DB_USER, DB_PASSWORD, DB_DATABASE);

        // return database handler
        return $this->conn;
        }
        }
        ?>

        Reply
  33. process is displaying “uploading image” but image is not uploading .
    it doesn’t toast anything ..Toast is blank
    Please help me with this.

    Reply
  34. my program erorr below.i cant run virtual
    Description Resource Path Location Type
    Conversion to Dalvik format failed: Unable to execute dex: Multiple dex files define Landroid/support/v7/app/ActionBar$DisplayOptions; a Unknown Android Packaging Problem

    Reply
  35. Belal Khan…How to compare these images for duplication.. as i m doing registration on the bases of thumbprints.. so how i could compare thumprints for duplication???? thanks in advance

    Reply
  36. Hi, Actually want to upload my image inside the Adapter like Recyclerview.Adapter and I initiated the views inside viewHolder. The problem is how can I override onActivityResult() inside the viewHolder or adapter?

    Reply
  37. Would you mind , make tutorial for upload and download pdf,doc, etc .. Or maybe all file types .. Thank you ..

    Reply
  38. i am using this code but given error Caused by: java.lang.OutOfMemoryError: Failed to allocate a 30743478 byte allocation with 16777216 free bytes and 25MB until OOM please help me

    Reply
  39. I want to upload image image from my android application to server using Django web server. I created a Django file upload app.I want to connect it with android application.

    Reply
  40. Hello, That’s code works me fine. Now, I want to know how to get file size and give a condition for upload less than 1 MB size image. . . . Thank you very much for your nice tutorial.

    Reply
  41. Hi,

    I’ve a problem wherein, I cannot upload images above 50kb, for some reason. I’m using Godaddy server and also checked max_upload_size but it is 32M, so this should not happen right?

    If you can help please?

    Reply
  42. Hi,
    I’ve encountered similar problems, where the toast displayed is it might have been due to the fact that i’m using xampp server. Is it possible for it to work using xampp server and how do i make it work?

    Reply
  43. this is the error i see in my logcat everytime i press the upload button. how do I fic this?

    10-02 05:55:23.373 2850-2894/com.fairoozzafar.imageuploadsample W/EGL_emulation: eglSurfaceAttrib not implemented
    10-02 05:55:23.373 2850-2894/com.fairoozzafar.imageuploadsample W/OpenGLRenderer: Failed to set EGL_SWAP_BEHAVIOR on surface 0xe3ab2780, error=EGL_SUCCESS

    Reply
  44. I dont get any error in my android project but it shows “The imageuploadsample has stopped working”
    I tried even by reinstallation but it doesnt work ….hw cn i fix it??????????

    Reply
  45. Will It work well for 3 images……should I upload them one after the other or do some other tricks. I am new to php and MySql so pls help

    Reply
  46. Hi,
    thanks Belal Khan.
    when i run this app on emulator. it work perfectly. but when i run it on Samsung mobile i get error (ViewRootImpl: sendUserActionEvent() mView == null ).
    Kindly help me i am waiting for your response.
    again thanks.

    Reply
  47. Hi..I got the error:undefined index: image in php file. But it is working from Postman. Can not upload image to database from emulator.

    Reply
  48. hello,
    it was a great tutorial, i searched for this at many sites but could not get the exact solution.
    i understood your android part and its working fine but i have problem in understanding php code as i do not have any knowledge about it.
    could you please provide this solution using java code.
    it would be of great help!!
    thanks in advance.

    Reply
  49. Hello,

    This tutorial is very very useful, it helped me a lot. I have a question Belal, onClickListener of listview it get all info about employee to other activity. but i want to this with recycleView can you help me ? i Tried the same code does work. this code in recycleView :

    @Override
    public void onItemClick(AdapterView parent, View view, int position, long id) {
    Intent intent = new Intent(this, ViewEmployee.class);
    HashMap map =(HashMap)parent.getItemAtPosition(position);
    String empId = map.get(Config.TAG_ID).toString();
    intent.putExtra(Config.EMP_ID,empId);
    startActivity(intent);
    }

    I want in RecycleView please help me…

    Reply
  50. hi…
    i am getting this error

    05-04 16:37:00.063 31633-32510/com.devimran.imrankhan.loadimage E/AndroidRuntime: FATAL EXCEPTION: AsyncTask #1
    Process: com.devimran.imrankhan.loadimage, PID: 31633
    java.lang.RuntimeException: An error occurred while executing doInBackground()
    at android.os.AsyncTask$3.done(AsyncTask.java:309)
    at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:354)
    at java.util.concurrent.FutureTask.setException(FutureTask.java:223)
    at java.util.concurrent.FutureTask.run(FutureTask.java:242)
    at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:234)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
    at java.lang.Thread.run(Thread.java:818)
    Caused by: java.lang.NullPointerException: Attempt to invoke virtual method ‘boolean android.graphics.Bitmap.compress(android.graphics.Bitmap$CompressFormat, int, java.io.OutputStream)’ on a null object reference
    at com.devimran.imrankhan.loadimage.MainActivity.getStringImage(MainActivity.java:79)
    at com.devimran.imrankhan.loadimage.MainActivity$1UploadImage.doInBackground(MainActivity.java:107)
    at com.devimran.imrankhan.loadimage.MainActivity$1UploadImage.doInBackground(MainActivity.java:86)
    at android.os.AsyncTask$2.call(AsyncTask.java:295)
    at java.util.concurrent.FutureTask.run(FutureTask.java:237)
    at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:234) 
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113) 
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588) 
    at java.lang.Thread.run(Thread.java:818) 
    05-04 16:37:00.095 31633-32510/com.devimran.imrankhan.loadimage I/Process: Sending signal. PID: 31633 SIG: 9

    my app goes crash everytime when i click on upload img button

    Reply
  51. Thanks a lot Belal for all the tutorials. I followed this particular tutorial and im able upload and download profile picture in the project i am currently pursuing. I have a question. Please how can I set a default picture in the android application when the user has not uploaded a profile picture?
    Anxiously waiting for your reply. Thanks in advance

    Reply
  52. Hi Bilal, This is nice tutorial. I am having problem in php webservice of uploading image in database. When I am uploading image at that time null value inserted in image column and it shows message Image Uploaded Successfully. I think $_POST[‘image’] is getting empty. So, please help me.
    Thank you

    Reply
  53. protected String doInBackground(Bitmap… params) {
    Bitmap bitmap = params[0];
    String uploadImage = getStringImage(bitmap);

    have an issue with params.
    what can be the solution for this?

    Reply

Leave a Comment