-6

How to insert an image in mysql database without uploading image(uploading-using html tag type=file).The images are stored in a folder in sequence. I am using html,javascript and php.

please post answer if you know.

  • Solution is you need to read image file information and insert image detail in mysql – uzaif Jun 18 '16 at 07:10
  • 1
    Welcome to Stack Overflow! Please take the [tour], have a look around, and read through the [help], in particular [*How do I ask a good question?*](/help/how-to-ask) – T.J. Crowder Jun 18 '16 at 07:11

2 Answers2

0

you might want to then just make a reference in the db a file path for example. if you have solved how to upload then just add that in. remember, you might also want to add some form of numbering to the file so you are certain the file will be correct. that way the file system wont be destroyed the first time some one uploads a image that is the same as the last one

0

You cannot save any image to a DB if you do not send information about that file...

If you are in a Web Browser, you could ask for the BASE64 of the image, and save that string to your DB.

Here is a question that will help you understand what I am trying to explain you.

You ask the user to enter the BASE64 that can be get from any online webpage that does this. This page does what I mean.

I hope this answered your question !

Community
  • 1
  • 1
matiaslauriti
  • 7,065
  • 4
  • 31
  • 43