Switch ($ _ FILES ['filedata'] ['error']) <br/>{< br/> case 0: <br/> $ MSG = "no error "; // comment this out if you don't want a message to appear on success. <br/> break; <br/> case 1: <br/> $ MSG = "the file is bigger than this PHP installation allows"; <br/> break; <br/> case 2: <br/> $ MSG = "the file is bigger than this form allows"; <br/> break; <br/> case 3: <br/> $ MSG = "only part of the file was uploaded"; <br/> break; <br/> case 4: <br/> $ MSG = "no file was uploaded"; <br/> break; <br/> case 6: <br/> $ MSG = "missing a Temporary Folder"; <br/> break; <br/> case 7: <br/> $ MSG = "failed to Write File to disk"; <br/> break; <br/> case 8: <br/> $ MSG = "File Upload stopped by extension"; <br/> break; <br/> default: <br/> $ MSG = "Unknown error ". $ _ FILES ['filedata'] ['error']; <br/> break; <br/>}< br/> if ($ MSG) <br/> $ stringdata = "error :". $ _ FILES ['filedata'] ['error']. "Error info :". $ MSG; <br/> else <br/> $ stringdata = "1"; // This is required for oncomplete to fire on Mac OSX <br/> echo $ stringdata;