# Updating an XML file with PHP

**URL:** <https://forum.kirupa.com/t/updating-an-xml-file-with-php/244219>\
**Category:** programming\
**Created:** [November 15, 2007, 11:52am UTC](https://forum.kirupa.com/t/updating-an-xml-file-with-php/244219 "2007-11-15T11:52:30Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![geraldinecmc](https://avatars.discourse-cdn.com/v4/letter/g/0ea827/32.png) [@geraldinecmc](https://forum.kirupa.com/u/geraldinecmc)\
**Post date:** [November 15, 2007, 11:52am UTC](https://forum.kirupa.com/t/updating-an-xml-file-with-php/244219/1 "2007-11-15T11:52:30Z")

</div>

Hello all,

I am completely new to PHP and therefore I have troubles solving a problem I have updating a XML file with a PHP file involving a text field and a submit button.

I include in attachement to this message my two files so far : an XML file called “news.xml” and a PHP file (the beginning of it…) with my text field and a submit button with the id “envoi”, both in a table with a invisible field called “action” near the submit button with the value “ecriture”.

What php code can I add to update my xml file? And where should I place the script?

Thank you in advance for your precious help.

Geraldine
