Android Question Send image to database sql with php


Active Member
Licensed User
]Hello! I need an example of how to send an image to a SQL database with PHP, to save the image in a field blob. I loaded the image in a imageview field. now I can send string data types correctly, but also need to send a picture regards

sub Boton_Click

  job2.Initialize ( "insertp", Me)
  job2.Download2("", Array As String ("nombre", nombre.Text ,"apellido" ,apellido.Text,"Ntelefono" ,Ntelefono.Text))
  nombre.Text = ""
  apellido.Text = ""
    ToastMessageShow("registro ingresado",True)

End Sub

Sub JobDone (Job As HttpJob)
  Log("JobName = " & Job.JobName & ", Success = " & Job.Success)
  If Job.Success = True Then
      Select Job.JobName
        Case "InsertP"
            'print the result to the logs
        Case "OtherFunction"
            'Do some things
      End Select
      Log("Error: " & Job.ErrorMessage)
      ToastMessageShow("Error: " & Job.ErrorMessage, True)
  End If
End Sub
Last edited:


Staff member
Licensed User
The PHP script from the MySQL tutorial doesn't support blobs. It is recommended to switch to RDC which is more powerful, faster, simpler, more secure and support blobs.

If the bitmap is not too large then you can convert it to a base 64 string and treat it as a text field.