For a form file upload I'm not able to access the globals.

So for example if the file upload name is $image,
$image_type and $image_size doesn't work.
Meaning, it's returning no values. But $image_name is returning a correct value.

echo "IMAGE NAME IS $image_name";
echo "IMAGE TYPE IS $image_type";
echo "FILESIZE IS: $image_size";

Why is this happening? And how do I fix this? Is it a modification of php.ini file??

    a year later

    Hi Janine

    I have the same problem with my Opera browser. But, my netscape and my explorer browser are ok.

    What I mean is that the problem come from your browser and not from your code...

    Bbp

      a month later

      Hi

      I know this probably isn't helping much, but I'm having the same problem (evident in IE), and it began after my ISP 'upgraded' to a newer version of PHP, after the security alert about uploading files a few weeks back. I'm pretty sure I hadn't modified my code in the meantime... :/

      Is there another quick'n'easy way of extracting file type and size from a file to be uploaded (without checking the file extension, since files uploaded from Macs won't necessarily have one...)

      Rgds
      CB

        Write a Reply...