Right, Thanks for this.
The responses were very useful.
But once more question if you please. How would you then resave the new php into an old file, but at the same time delete the current contents of the file?
I have used a fill in form to allow editing of the text, but then how do, once i've sent it, write it to the file and at the same time delete the current contents of the file.
I have tried using fopen() with both the a+ and w+ commands and then using fwrite() to store what was in the text area in the file but it only seems to add the form info at the end of the file, which corrupts it.
the w+ option also added lots of \ slashes into the file, is this just the form processing?
any way thanks for the origional information it was very helpful, if only i can figure out how to save properly... any way thanks again
Robert