I am attempting to implement an image file upload function on my site for the first time. I'm fiddling with some test code, and all goes well until I try to upload a jpg file. In that case ONLY the $filename var ends up as a null value. I do not see this with .txt, .gif, other files, and size in not the issue.
Here's the test code fragment:
<?php
print "userfile: " . $userfile . "<br>";
print "userfile_name: " . $userfile_name . "<br>";
print "userfile_type: " . $userfile_type . "<br>";
print "userfile_size: " . $userfile_size . "<br>";
phpinfo();
if (isset($userfile)) { rename($userfile, "/tmp/".$userfile_name); }
?>
<FORM ENCTYPE="multipart/form-data" ACTION="<? $PHP_SELF ?>" METHOD=POST>
<INPUT TYPE="hidden" name="MAX_FILE_SIZE" value="1000">
Send this file: <INPUT NAME="userfile" TYPE="file">
<INPUT TYPE="submit" VALUE="Send File">
</FORM>