How can pass the image in database in php?
+3
A:
Declare a field in the database as BLOB
Read the file with fread, escape it with the database-appropriate escape_string function, then store it like any other string.
Amadan
2010-06-16 04:37:06
A:
You must create a two fields in DB (file_name, md5_file). File dispose on server. If you add to DB a row with new photo, you check hash of new file, and compare him with DB's hash. And it is very good to rename photo_file to unique name.
Alexander.Plutov
2010-06-16 06:42:27