Using $_FILES as conditional along with $_POST
| From: | Jeffry Killen | Date: | Mon, 21 Sep 2015 23:18:14 +0000 |
| Subject: | Using $_FILES as conditional along with $_POST | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-325124@lists.php.net to get a copy of this message | ||
Hello all:
Thanks for just being here....
I had a very vexing problem and in composing the text of the question
I hit on the answer to the problem an the solution.
It involves the html form attribute enctype="multipart/form-data"
used for uploading files to the server, and the $_FILES superglobal.
It appears that php creates the $_FILES global when it sees this
enctype header in a post request, whether or not there are files
to be uploaded.
JK