help needed in improving functionality of simple file uploading script

The SitePoint Forums have moved.

You can now find them here.
This forum is now closed to new posts, but you can browse existing content.
You can find out more information about the move and how to open a new account (if necessary) here.
If you get stuck you can get support by emailing forums@sitepoint.com

If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

This script is meant to display the name of file uploaded in the upload successful line but it doesn't it omits it any idea why?

I would like to display a web page if the file uploads sucessfully and one if it doesn't what do i add to my script so it will do this?

I would like an upload page that automatically displays all the file names in a directory as links to the files.

Finally i would like an email sent to me to let me know a file has been uploaded

My host has said to make this secure and allow only people i want to see the upload area I need to place the upload script in a password protected directory, is this secure enough? I would really appreciate the help or if you could direct me to some kind of tutorial that would help me achieve any of this it's be great.