this is my xml file its using in flash image viewer

<?xml version="1.0" encoding="UTF-8"?>

<gallery>
<image url="Flower Photo 1.jpg" />
<image url="Flower Photo 2.jpg" />
<image url="Flower Photo 3.jpg" />
<image url="Flower Photo 4.jpg" />
<image url="Flower Photo 5.jpg" />
<image url="Flower Photo 6.jpg" />
<image url="Flower Photo 7.jpg" />
<image url="Flower Photo 8.jpg" />
<image url="Flower Photo 9.jpg" />
<image url="Flower Photo 10.jpg" />
</gallery>

what i want is add new image tag using php form

Try following these steps:

1. Read the XML file content into a PHP array.
There are many ways of doing this. I'd recommend the use of a couple of simple functions for converting between XML data and PHP arrays. (Google "php array to xml")

2. Add the new image to the array.
Then sort the array (if order is of any concern).

3. Convert the array back into XML and write that out to the XML file.
(Use the function/s from #1)

Hope that helps.

-Dave

ok thanx ill try

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.