PHP to modify XML file

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Mac_Guy
Forum Newbie
Posts: 1
Joined: Fri Dec 19, 2008 8:30 pm

PHP to modify XML file

Post by Mac_Guy »

Essentially I need a secure admin panel to modify an XML file and upload a file.
Here's what the XML looks like:

Code: Select all

<pic>
    <image>gallery/1.jpg</image>
    <thumbnail>gallery/s1.jpg</thumbnail>
    <caption>Some lamp on the ground</caption>
</pic>
So essentally I need a way for the php to enclose Image, thumbnail, and caption into the pic tag, I need it to be able to upload the image then auto resize it to a predefined setting, then a box for a caption.
And it needs to be a secure admin panel.

Thoughts?

Flash gallery I'm using
http://www.flashgallery.org
toasty2
Forum Contributor
Posts: 361
Joined: Wed Aug 03, 2005 10:28 am
Location: Arkansas, USA

Re: PHP to modify XML file

Post by toasty2 »

Those are a bunch of steps, but I'll steer you in the right direction. I hope you know some PHP and HTML, otherwise you shouldn't be asking those questions yet and we can't really help you.
1. Form: You should know HTML. Forms aren't that complex. You'll need an upload box, a caption box, and whatever else. You say you want it to be secure? Add in a password blank and check for it in your script.
2. XML: You could use simplexml.
3. Image stuff: Use GD. Search for some thumbnail generation tutorials.
4. Upload: Search for an upload tutorial. There are tons of them.

I get the feeling you don't know more than a minuscule amount about some of the technologies you'll be using for this. If so, you'll need to do tons of reading, and a HTML/PHP tutorial beforehand.
Post Reply