Exporting to a textfile (or any other if better)

Ok I’m trying to make a small thing on a website that will allow the user to update the news themselves… after reading up on it i found that to export a textfile in this way I would have to have a serverside script to execute it for me (PHP in my case)… I did it, but it isnt working… what am i doing wrong? plz help

SOURCES:

http://jayhayes.no-ip.com/Jay/crap/exporter.zip