# I need some simple help from a PHP guru

**URL:** <https://forum.kirupa.com/t/i-need-some-simple-help-from-a-php-guru/278386>\
**Category:** Uncategorized\
**Created:** [December 29, 2008, 10:01am UTC](https://forum.kirupa.com/t/i-need-some-simple-help-from-a-php-guru/278386 "2008-12-29T10:01:29Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![lexiielove](https://avatars.discourse-cdn.com/v4/letter/l/e56c9b/32.png) [@lexiielove](https://forum.kirupa.com/u/lexiielove)\
**Post date:** [December 29, 2008, 10:01am UTC](https://forum.kirupa.com/t/i-need-some-simple-help-from-a-php-guru/278386/1 "2008-12-29T10:01:29Z")

</div>

i need a way to write new data to an XML file using a PHP form.  
i know this topic has probably been covered quite a few times, but all the examples were wayyy too complicated for what i want to do.

i basically have a XML phonebook, so if i lose my phone i will still have people’s phone numbers.  
i want to add a form at the bottom so I can add a new entry to my phonebook.

the structure of my XML file is like this:

\<?xml version=“1.0”?\>  
\<phonebook\>  
\<person\>  
\<firstname\>…\</firstname\>  
\<lastname\>…\</lastname\>  
\<number\>…\</number\>  
\</person\>  
\<person\>…and so on.

i have a separate PHP file to display the data, but i have no idea how to add to it.

thanks!!!
