Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>You might want to take a look at the upload section of the PHP manual : <a href="http://php.net/manual/en/features.file-upload.php" rel="nofollow noreferrer">Handling file uploads</a> ; it would probably be a good start ;-)</p> <p>For instance, you might see that the file's informations are store in <code>$_FILES</code>, and not in <code>$_POST</code> (see <a href="http://php.net/manual/en/features.file-upload.post-method.php" rel="nofollow noreferrer">POST method uploads</a>) -- at least, considering your example, I suppose you are searching for the file in <code>$_POST</code>, and not <code>$_FILES</code>.</p> <p>in your case, considering the input field is named "<code>binFile</code>", you'd probably want to use <a href="http://php.net/var_dump" rel="nofollow noreferrer"><code>var_dump</code></a> <em>(or any equivalent)</em> on <code>$_FILEs['binFile']</code>, to see what's inside ;-)</p> <p>Then, you can use <a href="http://php.net/is_uploaded_file" rel="nofollow noreferrer"><code>is_uploaded_file</code></a> and <a href="http://php.net/move_uploaded_file" rel="nofollow noreferrer"><code>move_uploaded_file</code></a> to work with the file itself.</p> <p><br> Then, are you sure you want to store the file's content into the Database, and not on disk, only storing into DB the path to the file ?</p> <p>About that, you can take a look at this question and its answers : <a href="https://stackoverflow.com/questions/3748/storing-images-in-db-yea-or-nay">Storing Images in DB - Yea or Nay?</a> -- it's not specific to PHP, but the ideas should still be true.</p> <p>Maybe <a href="https://stackoverflow.com/questions/186656/where-to-store-uploaded-files-sound-pictures-and-video">Where to store uploaded files (sound, pictures and video)</a> could help too ;-) <br>Same about <a href="https://stackoverflow.com/questions/325126/storing-a-small-number-of-images-blob-or-fs">Storing a small number of images: blob or fs?</a>, and/or <a href="https://stackoverflow.com/questions/561447/store-pictures-as-files-or-in-the-database-for-a-web-app">Store pictures as files or in the database for a web app?</a></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload