Posted on

Take Away My Programming License!

I spent most of yesterday troubleshooting why I could not get a file to upload with a form and php. I naturally jumped to enctype and immediately confirmed it to be enctype=”multi-part/form-data” because that is usually the problem. Then I checked all the various server settings. Finally this morning I reduced the code to its simplest form to test and got a file to upload! Then I realized that enctype=”multi-part/form-data” was not correct. enctype=”multipart/form-data” is correct.

So many wasted hours!

I no longer feel so bad. I use O’Reilly’s HTML Pocket Reference to double check syntax etc and sure enough on 24 they have printed “multi-part/form-data” instead of “multipart/form-data”. Since I do file uploading so infrequently I used their reference instead of my editor’s shortcut. I still recommend the reference (if for anything, the color chart in the back is very helpful).

Leave a Reply