It would be better if this script would use no autoincrement IDs. This makes it easy to "sniff" for images uploaded by others. I would suggest to use an MD5 sum (of the date and time for example) or even better a real random string encoded with BASE64.
Wolfgang
