Thanks for your replies.
Basically what I need to do is simulate a basic stock control system that generates orders in XML format for a DVD shop.
What I have at current is a page with a button, that when pressed checks a MySQL db to see if orders need to be generated i.e. stock is low.
If it is I need to generate a vary basic order form in XML that stores the ID and the number required for each DVD.
Once created this file does not need to be updated or changed. Just overwritten if new orders are to be generated.
Would it be a case of using fwrite?