have you actually tried making a start or are you hoping someone else will make the script for you.
If you truly wish to write such a script then look at the $_FILES array as well as GD functions in PHP (provided the server you are on is running GD) and lastly look at storing binary data in the database (although ideally you should have them on the file system instead of within a database, simply store the names in the database).
If it is a case of you wanting someone else to code it for you, you will be better posting in the 'Web Development Wanted' section.