But what if you‘re of the OO-persuasion and use square brackets in your input name attributes to group the properties of your object? Something like this:
<label>Zip File: <input type="file" name="download[zip]"
<label>Screenshot: <input type="file" name="download[screenshot]"
Based on the behavior of the
$_POSTsuperglobals one would assume something along the lines of:
But what have we learned about assumption? Suddenly,
$_FILESis a tangled mess. The properties of your uploaded files become properties of your named object and the properties you were expecting become properties of the uploaded file properties! Zah?
Why am I not surprised?