Jump to content

Using PHP to edit XML that controls Flash Gallery


cjbeck71081

Recommended Posts

I have been reading up on XML editing with PHP for a while now and I dont think im getting straight forward answers from the posts on search engines.  I have read the manual on simpleXML at php.net and I still am not sure what I am trying to do is the best way for things to be done.

 

Basically what i have is a Flash Photo Gallery that is controlled by XML.  Photo name, description, order number are all values in the XML.  Now I want to be able to create a back end system that will allow a user to control the photo gallery... and I thought PHP was the best route since that is what i know best.

 

First I thought about creating tables in an SQL table and storing the info there, only to be written to an XML file every time the user clicked "Save" on the admin control panel.  That became a hastle because I wouldve needed to create temp tables for data storage and it just seemed like the hard way of doing things.

 

So next, i thought why not use simpleXML to edit the XML doc directly.  Never needing the SQL to get involved.  I read post after post trying to find out if simpleXML can(and if so how to) delete nodes in an XML file to remove pictures, re-order nodes to reorder pictures or edit nodes to say... edit a description of a picture in the gallery.  I have had success adding nodes.. but, still no luck on these three things

 

Any resourse or instructional you guys have would be great.  Otherwise if you can think of a better way of doing this, I am open to ideas.

 

Thanks for the help in advance.

 

Chris

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.