Page 1 of 1

PHP to modify XML file

Posted: Fri Dec 19, 2008 8:35 pm
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

Re: PHP to modify XML file

Posted: Sun Dec 21, 2008 1:22 am
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.