bradgrafelman;11013611 wrote:What does "doesn't work" mean? Which error statement is getting set? Are you getting any PHP error messages? One issue I see is that you never check to see if the file upload was even successful (see: [man]features.file-upload.errors[/man]) before you attempt to process it. Can you do a [man]print_r/man on the $_FILES array and show us the output?
Also note that checking the 'type' value in the $_FILES array isn't very secure; I can easily upload "my_nasty_virus.exe" and simply claim it's of type "image/gif".
Sorry, I should've been more clearer.
I have error reporting turned fully on and there's no error.
And the only validation error I get upon submitting the form is the first error message, which is:
Image File: Browse and select a GIF/JPEG Image File to upload!
print_r($_FILES['userfile']);
Does not give an output
print_r($_FILES);
Only gives,
Array ( )
Please let me know if you want me to check anything else.