I have tried reading multiple tutorials, the PHP documentation and have no idea what I am doing.
Here is my form
You'd better follow this tutorial: http://www.w3schools.com/php/php_file_upload.asp
foreach ($_FILES['file'] as $file) {
if($file['error'] == UPLOAD_ERR_OK) {
$check_name = $file['name'];
// I assume you have to use the file type here, not name
$filetype = checkfiletype($file['type'], 'jpg,jpeg');
$temp_name = $file['tmp_name'];
$image_name = 'image_' . $file['name'] . '1';
move_uploaded_file($tmp_name, $upload_dir . $image_name);
}
}
Your files are in $_FILES['files'] so using foreach you have to go over each element/file and take its data.