Mind_freak:
Please see this w3schools tutorial
I recommend you google for a tutorial, and if you run into trouble, come here to post your code (be sure to put PHP code between [php] and [/php] tags.
People here generally won't write an entire script for you, so I recommend giving it your best shot first and coming back if you run into trouble.
For instance, I found the above tutorial by typing "php file upload images" in google.
You can modify that tutorial to suit your needs for any mime type you wish to allow.
If you wish to only allow the upload of specific scripts BEFORE upload, you will have to research some client side technologies, including Javascript, Java and Flash.
There are commercial and non-commercial components available to do what you want, and more (including resizing images, etc).