When setting the enctype to multipart/form-data in an HTML form, $_POST variables will not be set. The variables are set without the enctype but it must be in order to use the $_FILES array. Is there an alternative to using the $_FILES array?
Bug report: https://bugs.php.net/bug.php?id=26004
The bug can be fixed by updating Apache, however I would like to find a possible workaround before I resort to doing that.
EDIT: After updating to the latest version of Apache, the problem still persists.
When you set the enctype to
multipart/form-data,$_POSTwill be populated.You are able to access the data via
php://inputor$HTTP_RAW_POST_DATAalternatively, in case the enctype is notmultipart/form-datawhich might be an alternative for you to access the data.