I am encountering an odd issue,
Is there a reason why having two file upload fields in the same form should cause a problem?
One is named '1' the other is named '3' (what happened to 2? who knows)
I can upload one file, then come back and upload the second file, but if I try to upload them both at once, only the first file works...
This code is ugly, but here is what I am using so far
if (empty($HTTP_POST_FILES['1'])) $HTTP_POST_FILES['1'] = $_FILES['1'];
$file = $HTTP_POST_FILES['1']['tmp_name'];
if ($file != $nil && $HTTP_POST_FILES['1'][type] == 'image/jpeg' || $HTTP_POST_FILES['1'][type] == 'image/pjpeg') {
move_uploaded_file($HTTP_POST_FILES[1]['tmp_name'], "$svr_rootscript/product_images/tmp/$_POST[IMAGENAME].jpg");
if (empty($HTTP_POST_FILES['3'])) $HTTP_POST_FILES['3'] = $_FILES['3'];
IF (!EMPTy($HTTP_POST_FILES['3']['name'])) {
$file = $HTTP_POST_FILES['3']['name'];
$NEWNAME = $HTTP_POST_FILES['3']['tmp_name'];
$pieces = explode("/", $NEWNAME);
$NEWNAME = $pieces[2];
$pieces = explode(".", $file);
$EXT = $pieces[1];
move_uploaded_file($HTTP_POST_FILES['3']['tmp_name'], "$_SERVER[PHPRC]/upload/$NEWNAME.$EXT");
}