How can I convert image (jpg,gif) to data until I can save it in database
Printable View
How can I convert image (jpg,gif) to data until I can save it in database
I am not sure what you are asking but i would assume by using the fread() function? if that is what you are attempting...
just insert the image into your mysql table as a blob.
Please M.R phpman .. I want an example
Why do you want to save it to a database?
Just save the images in a folder and then save their URL in the database.
yes HObo has it correct. you save imges in the database and it will become huge fast.
what in the hell are you making anyway.
I know that but I want to learn how can I convert image to data .. because I read that this is enable in php languageQuote:
Originally posted by The Hobo
Why do you want to save it to a database?
Just save the images in a folder and then save their URL in the database.
they are just pointing out that it has no practical purpose, none that I can see anyway
no, mysql does all the workQuote:
Originally posted by prokhaled
I know that but I want to learn how can I convert image to data .. because I read that this is enable in php language
Then do a search on "blob." It's been asked before. I know the search is busted, so just wait a tick. I'm pretty sure life isn't going to explode if you can't put your images in a database.Quote:
Originally posted by phpman
yes HObo has it correct. you save imges in the database and it will become huge fast.
what in the hell are you making anyway.