unable to access the $_FILES when submitting a form php
I was getting this weird error when submitting an image for a form upload and i could not see why the $_FILES was not set as this is where the files go from a $_POST back form in php.
The error i was getting was similar to:
Notice: Trying to access array offset on value of type null
Warning: mime_content_type(): Can only process string or stream arguments
So apparently the fix for this is in the form type.
You can add the following to your
<form method="POST" enctype="multipart/form-data">...</form>
For some reason i always forget to add this and i get this error, so im adding it here hoping that i will not forget again, but incase i do its here!