I am trying to upload 4 images from a form using code below. All images upload and output fine apart from the last one which always has added code at the end of the image for example, image4.jpg%3E. As you can see the %3E is always being added… not sure why…? any ideas?
$product_image=$_FILES['product_image'];
$product_image2 = $_FILES['product_image2'];
$product_image3 = $_FILES['product_image3'];
$product_image4 = $_FILES['img_product_now'];
if (is_uploaded_file($product_image['tmp_name'])&& ($product_image2['tmp_name'])){
$filename=$product_id;
$filename2=$product_id.'_2';
$images = uploadPImage($product_image, $imgpath, $filename);
$images2 = uploadProductImage($product_image2, $imgpath, $filename2);
}
if (is_uploaded_file($product_image4['tmp_name'])&& ($product_image4['tmp_name'])){
$filename3 = $product_id.'_3';
$filename4 = $product_id.'_4';
$data = uploadPImage ($product_image3, $imgpath, $filename3);
$data2 = uploadPImage ($product_image4, $imgpath, $filename4);
}