0

I've read many articles on stackoverflow about this particular question, but I haven't seen one that explains it like I need it to be explained:

So I'm just trying to get a better understanding of using blobs and the $_FILES to insert and retrieve image files from a MySQLI database.

So far, I know that blobs are used for images, that they can be tiny/regular/medium/and large depending on the size.

I also know that $_FILES is used to get user file input like $_POST can be used to grab a username from a form.

I eventually want to get to the point where I can store a user-uploaded images into a database, and then display those images on the users profile.

Can someone give me any information on as how to do this?

Funk Forty Niner
  • 74,450
  • 15
  • 68
  • 141
user3630206
  • 1
  • 1
  • 2
  • 4
    Don't use blobs to store the files directly into the database. The best way is to put the filename in the database and store the file itself in a directory on your webserver. – Joren May 13 '14 at 22:07
  • @Joren how would I go about storing the file itself in a directory on the webserver(localhost). Up until now I've just been using MySQLI for all storage – user3630206 May 13 '14 at 22:09
  • best file upload tutorial i know: http://www.php.net/manual/en/features.file-upload.php –  May 13 '14 at 22:10
  • Here is a good link explaining to you the +/- of using database and/or filesystems: http://stackoverflow.com/questions/6939049/storing-files-in-database-vs-file-system – Aziz Saleh May 13 '14 at 22:21
  • [Here's another resource that might help.](http://google.com) – Qix - MONICA WAS MISTREATED May 13 '14 at 22:37

0 Answers0