ok, ive been trying to figure this out, what can i use to run a basic check to see if something is a specific file type? say for example i only want to allow “.doc” file types. ill keep looking but any assistance would be nice
@welshauthorMar 01.2006 — #yes, how would i do that, right now its checking for an image, the line is: [code=php] @getimagesize($_FILES[$fieldname]['tmp_name']) or error('only image uploads are allowed', $uploadForm); [/code]
@bathurst_guyMar 01.2006 — #[code=php]if($_FILES[$fieldname]['type'] == "application/msword"){ #upload it }else{ error("Incorrect file type. Only Microsoft word documents can be uploaded"); }[/code]
@welshauthorMar 01.2006 — #k, and to do multiple file types it would be: [code=php] if($_FILES[$fieldname]['type'] == "application/msword" or "image/jpeg"){ #upload it }else{ error("Incorrect file type. Only Microsoft word documents can be uploaded"); } [/code] am i remotely close?