Honestly, that's very horrible code. This smells like a ripoff from roseindia.net. Please ignore that site forever, it almost only shows bad code examples and introduces bad practies. It's maintained by amateurs with the only focus on advertisement incomes.
To handle file upload I highly recommend you the Apache Commons FileUpload API. Here it is:
http://commons.apache.org/fileupload Especially read the 'User Guide' section how to use it. It's fairly easy. For trouble or just for tips/tricks consult the 'Frequently Asked Questions' section. It's simply great stuff; thoroughly tested in all known situations and highly reliable.
[ December 14, 2008: Message edited by: Bauke Scholtz ]