Allows users to upload files to your website. I wrote this script to illustrate the basic operations required for file uploading, I don't recommend it be used as is, because people may upload programs and scripts. If you want only images to be uploaded, you may want to modify the extension of any file that doesn't have isn't a jpg, png, or gif.
For those getting permission errors when running this script, it may be because PHP, that usually runs as the user nobody, does not have permission to write to your directories. Chmodding the upload folder with 0777 is one solution (not a very attractive one), another would be to Chown it to user_name:nobody.