I am trying to upload several files but it dosnt work. Can anybody tell what i am doing wrong?


<FORM ACTION="upload.php" METHOD="POST" encrypt="multipart/form-data">
<tr><td>Fil 1/td><td><input name="thefile[]" type="file"></td></tr>
<tr><td>Fil 2/td><td><input name="thefile[]" type="file"></td></tr>
<tr><td>Fil 3/td><td><input name="thefile[]" type="file"></td></tr>
<tr><td>Fil 4/td><td><input name="thefile[]" type="file"></td></tr>
<tr><td>Fil 5/td><td><input name="thefile[]" type="file"></td></tr>
<tr><td>Fil 6/td><td><input name="thefile[]" type="file"></td></tr>
<tr><td>Fil 7/td><td><input name="thefile[]" type="file"></td></tr>
<tr><td>Fil 8/td><td><input name="thefile[]" type="file"></td></tr>
<tr><td>Fil 9/td><td><input name="thefile[]" type="file"></td></tr>
<tr><td>Fil 10/td><td><input name="thefile[]" type="file"></td></tr>
<tr><td>Fil 11/td><td><input name="thefile[]" type="file"></td></tr>
<tr><td>Fil 12/td><td><input name="thefile[]" type="file"></td></tr>
<tr><td><td colspan="2"><input type="submit" value="UPLOAD"></td></tr></FORM>


PHP Code:

// upload.php

$thefile $_POST['thefile'];

for (
$i=0$i<count($thefile); $i++) {

 
$tmp $_FILES['thefile']['tmp_name'][$i];

$filename time() .jpg;
$file "c:/data/voice/arkiv/" $filename;

if (
is_uploaded_file($tmp) AND copy($tmp$file)) {


}

   }