--sorry if you get this twice...it didn't seem to go through the first time--

I just switched hosts and I am now working on all the stuff that once
worked but now doesn't.  I have an image upload script with the
following code:

<form method='post' enctype='multipart/form-data'
action='<?=$_SERVER['PHP_SELF'];?>?method=upload&id=<? echo $id?>'>
   <?php
       for( $i = 0; $i < $files_to_upload; $i++ )
       {
   ?>
                 <tr>
                      <td colspan=5><input type='file' name='file[]'
style='width: 100%'></td>
                    </tr>
   <?php
       }
   ?>
                   <tr>
                      <td colspan=4 align='center'><input
type='submit' value='Upload'></td>
                    </tr>
                    </form>

Then, here is part of the code doing the upload:

<snip>
//When REGISTERED_GLOBALS are off in php.ini
 $_POST    = $HTTP_POST_VARS;
 $_GET     = $HTTP_GET_VARS;

 //Upload the file
   if($_GET['method'] == "upload")
   {
      echo "1<br>";
     $file_array = $HTTP_POST_FILES['file'];
     $uploads = false;
     for($i = 0 ; $i < $files_to_upload; $i++)
     { echo "2<br>";

       if($HTTP_POST_FILES['file']['name'][$i])
       { echo "3<br>";
</snip>

It prints out the 2 but doesn't get into the 3 loop....but I am
uploading files.  I have tried it with $_FILES and $HTTP_POST_FILES.
This worked on my last hosts servers but not the new host.  Any ideas?

Thanks!

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to