upload and add new page scripts won't work together. help please
===

Could someone help me with that:

http://tinypaste.com/92c58033/fullscreen.php?hash=1666f7f5138aba227d96d38e9b406c78&toolbar=true&linenum=true

I have created a script to add a new page from administrator panel. When I use upload script script separated from add new page script they both work fine, but when I try to put them together as in that page none work. I am new in PHP programming, so I will appreciate any help. 

Thanks for your help,