I am not facing anykind of errors, I just want an improvement.

i highly reccomend no one to use this script for the safty of your site
I didn't post this code as an article, so that is obivous.

He is probably developing it and looking for some error correction
I am learning PHP now a days, and implementing it on my demo website

heheehhe well there is your first error to block file type extensions
And that's what I have requested to help