Skip to content
Advertisement

Problem with identifying index in php html

My website must consist of a page with table where admin must upload some file. Later that file is saved by php as a blob in mysql, however, $_FILES cannot find and index of my file input. Please help finding a mistake.

PHP code

Advertisement

Answer

Apart from security flaws in your code you are missing enctype='multipart/form-data' inside the form element.

Try:

It will tell the browser you’re sending a file.

User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement