I want the users to upload files through my webapp I am developing in PHP usinig MySql in the backend. I want to store the files in the database. I am facing problems in doi
You might want to take a look at the upload section of the PHP manual : Handling file uploads ; it would probably be a good start ;-)
For instance, you might see that the file's informations are store in $_FILES, and not in $_POST (see POST method uploads) -- at least, considering your example, I suppose you are searching for the file in $_POST, and not $_FILES.
in your case, considering the input field is named "binFile", you'd probably want to use var_dump (or any equivalent) on $_FILEs['binFile'], to see what's inside ;-)
Then, you can use is_uploaded_file and move_uploaded_file to work with the file itself.
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 ?
About that, you can take a look at this question and its answers : Storing Images in DB - Yea or Nay? -- it's not specific to PHP, but the ideas should still be true.
Maybe Where to store uploaded files (sound, pictures and video) could help too ;-)
Same about Storing a small number of images: blob or fs?, and/or Store pictures as files or in the database for a web app?