Problems when using enctype = & ldquo; multipart / form-data & rdquo; with $ _POST variables

advertisements

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, $_POST will be populated.

You are able to access the data via php://input or $HTTP_RAW_POST_DATA alternatively, in case the enctype is not multipart/form-data which might be an alternative for you to access the data.