# \[php flash\] changing an xml nodes attribute from flash

**URL:** <https://forum.kirupa.com/t/php-flash-changing-an-xml-nodes-attribute-from-flash/61804>\
**Category:** programming\
**Created:** [August 22, 2004, 12:11am UTC](https://forum.kirupa.com/t/php-flash-changing-an-xml-nodes-attribute-from-flash/61804 "2004-08-22T00:11:18Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![wideybard](https://avatars.discourse-cdn.com/v4/letter/w/65b543/32.png) [@wideybard](https://forum.kirupa.com/u/wideybard)\
**Post date:** [August 22, 2004, 12:11am UTC](https://forum.kirupa.com/t/php-flash-changing-an-xml-nodes-attribute-from-flash/61804/1 "2004-08-22T00:11:18Z")

</div>

Hello

Basically - Im trying to create a flash prog which reads from an XML file and displays various band information - graphic, website, info e.t.c and dispalys it in flash

I have read thorugh your fine xml tutorials and have managed to get it going fine. I can read and maniulate the data perfectly. The bands display as a long list which the user can click on.

The problem i have is i want to incorporate a ‘clickthrough’ figure to the display which will show how many times this band has been viewed. Every time the user click on the list - it brings up the data and adds one to the amount of times it has been viewed.

Here is my xml file (banddata.xml)

\<?xml version=“1.0”?\>  
\<myMenu\>  
\<myItem band=“Band1” url=“url1” views=“0” graphic=“graphic1” music=“music1”/\>  
\<myItem band=“Band2” url=“url2” views=“0” graphic=“graphic2” music=“music2”/\>  
\<myItem band=“Band3” url=“url3” views=“0” graphic=“graphic3” music=“music3”/\>

```
  &lt;/myMenu&gt;

```

So i need to have a php script which is called from a button/menu in flash which when run goes into my xml file - seeks out the correct band and increments the views by one.

Ive found the code for the guestbook and tried to manipulate that but with no success.

Any help you could give would save me a lot of gnashing of teeth and would be most welcom.

Thanks

wideybard

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 22, 2004, 7:41am UTC](https://forum.kirupa.com/t/php-flash-changing-an-xml-nodes-attribute-from-flash/61804/2 "2004-08-22T07:41:53Z")

</div>

just increment it in Flash then save it from there.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 22, 2004, 8:55am UTC](https://forum.kirupa.com/t/php-flash-changing-an-xml-nodes-attribute-from-flash/61804/3 "2004-08-22T08:55:57Z")

</div>

Thanks for your reply senocular

I can increase it in flash fine but its specificaly the php script which will go into the view attribute of the band and change only that i am after. All the php scripts i have seen go into the xml and write the whole thing over again - not just alter a bit of data.

I just need to find out how to reference the ‘view’ attribute of the myItem[] node and then alter that piece of data only.

Any idea

thanks

wideybar

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 22, 2004, 8:58am UTC](https://forum.kirupa.com/t/php-flash-changing-an-xml-nodes-attribute-from-flash/61804/4 "2004-08-22T08:58:08Z")

</div>

just write it over again. its much easier that way.
