Currently working on a website for a children’s hospital charity, pro bono work so I have no budget to work with and am unable to outsource a proper developer to help me. Now I’m in a bit of a stuck spot, I’ve already worked out most of the website, but have run into a wall when it comes to the server side stuff.
I have a Flash file (that you don’t need to worry about), and I use an XML to control data in this Flash file. An example of how the XML looks is:
example.xml
<example>
<item>
<name>John Smith</name>
<donation>100.00</donation>
<message>Hi, my name is John.</message>
</item>
</example>
Basically the , and childs control text in the Flash document for donation graphics.
So if I update the XML file myself, it’s fairly simple and everything works, but the problem is we’re expecting just under 1000 donations, and that would be extremely tedious.
What I want to be able to do is have a donation form I’m using to write the data into the XML file, so when someone donates their information is instantly updated on the Flash site.
Say one of my form inputs was:
<input name="txtFirstName" type="text" id="txtFirstName" />
How do I get the PHP to add it into the XML in such a way:
<item>
<name>***Whatever was written in the input txtFirstName goes here***</name>
<donation></donation>
<message></message>
</item>
Anyone help would be really appreciated.