Help! Need example of parsing data from flash to php to xml

Hi,
At the moment im doing my final year of college in multimedia programming and i have come across a problem with my thesis. You see im trying to create a flash that takes in dynamic data and display it on a bar chart. At the moment i have it taking static data from an xml but i have to change the values in xml for the flash chart to appear different.

Is there anyone that can give me an example of how i could press a button which parses data to a php then inturn parses data to that XML file i was talking about early which inturn would change the bar chart informaton dynamically.

If anyone can help me or give me an example of what im trying to acheive that would be great and i would be soooooo greatful.

Anyway hope you can help and take care.

Peter