Hi guys…
I’m developing a backend and I need to upload 2 images at the same time.
I got it to work with only one image upload. But I can’t figure out how to do this with 2 input file type fields at the same time.
Here is what I’m working with:
[code]$fimage=$_FILES[‘fimage’][‘name’];
$fthumb=$_FILES[‘fthumb’][‘name’];
//upload file
$target_path = “upload/”;
$target_path = $target_path . basename( $_FILES['fimage']['name']);
if(move_uploaded_file($_FILES['fimage']['tmp_name'], $target_path)) {
echo "The file ". basename( $_FILES['fimage']['name']).
" has been uploaded";
} else{
echo "There was an error uploading the file, please try again!";
}
//end upload file[/code]