Ok, problem. Im writing a scriot to upload a file to my server. It works fine when you use a gif. but try to sue a jpeg and it says wrong file type.
Am i right in thinking that the $_FILE[userfile][type] value for a JPEG should be, image/jpeg?
Can we have some code please?
didnt think i needed code for my question but here ya go:
<?php if ($_FILES[icon][type] == "image/gif") { $extension = ".gif"; } elseif ($_FILES[icon][type] == "image/jpeg") { $extension = ".jpg"; } else { $IconErrorType = "$font_error <b>ERROR: Invalid File Type.</b></font><p>"; } ?>
You will also see image/jpg from time to time.
You should echo $_FILES['userfile']['type'] and see what it says.
image/pjpeg!
whey! Thanks y'all!