//index.php File upload
Upload file:
//upload.php ($fileSize)) { $valid_file = false; $message = 'The file size is to large'; } if($valid_file) { move_uploaded_file($_FILES['file']['tmp_name'], $uploadsPath . $newFileName); $message = 'The file has been uploaded'; } } else { $message = 'Error: '.$_FILES['file']['error']; } echo $message; }