I am trying to upload multiple files. here is what i have:

$uploadPath = "/uploads";

Code:
if(count($_FILES['filesToUpload']['name'])>0) {
  foreach ($_FILES['filesToUpload']['name'] as $file) {
    if ($_FILES['filesToUpload']['error'] == UPLOAD_ERR_OK) {
        $tmpName = $_FILES["filesToUpload"]["tmp_name"];
        $fileName = $_FILES["filesToUpload"]["name"];
        $newFile = $uploadPath.$fileName;
        move_uploaded_file($tmpName, $newFile);
    }
  }
}
Code:
<input name="filesToUpload[]" id="filesToUpload" type="file" />

trying to do this: http://davidwalsh.name/multiple-file-upload