Writing to XML using PHP

Hello,

I’m new to PHP and coding and would apprecaite the help.

Not sure if this is the right place to ask this question, but I wanted help to write to an XML file using PHP.

I want to add images using a form to an XML file without having to manually open the file on live server and adding them to the XML file.

for example:
<?xml version=“1.0” encoding=“utf-8”?>
<Piecemaker>
<Settings>
<imageWidth>900</imageWidth>
<imageHeight>350</imageHeight>
<segments>10</segments>
<tweenTime>2.5</tweenTime>
<tweenDelay>0.1</tweenDelay>

&lt;tweenType&gt;easeInOutBack&lt;/tweenType&gt;
&lt;zDistance&gt;100&lt;/zDistance&gt;
&lt;expand&gt;10&lt;/expand&gt;
&lt;innerColor&gt;0x111111&lt;/innerColor&gt;
&lt;textBackground&gt;0x333333&lt;/textBackground&gt;
&lt;shadowDarkness&gt;75&lt;/shadowDarkness&gt;

&lt;textDistance&gt;25&lt;/textDistance&gt;
&lt;autoplay&gt;5&lt;/autoplay&gt;

</Settings>

<Image Filename=“images/3dslider/1.png”></Image>
<Image Filename=“images/3dslider/2.png”></Image>
<Image Filename=“images/3dslider/3.png”></Image>
<Image Filename=“images/3dslider/4.png”></Image>
<Image Filename=“images/3dslider/5.png”></Image>

</Piecemaker>

I was wondering if anyone has anything that will allow me to add the fields and change the setting using a form that will write to this xml file.

Thank you