[PHP] Upload using FTP commands

2010-08-26 Thread Matthew Croud
Hi, I want to give my client the ability to upload large files ( around 20MB ) to a webspace. I reckon that using the FTP commands of PHP would be the best bet, but is it possible to allow them to do this through an online form. This is my vision: the client logs in to a form that has an u

[PHP] image upload keeps file name ?

2010-04-01 Thread Matthew Croud
Hi Guys, Can someone confirm for me that the code below will move an uploaded file and give it the same name as the original image file name ? $file_dir = "/home/uploads"; foreach($_FILES as $file_name => $file_array) { echo "path: ".$file_array["tmp_name"]."\n"; echo "name:

[PHP] DOM append to the top

2009-11-20 Thread Matthew Croud
Yo! I have a working form that adds user input to an XML file, it adds the new "item" element to the bottom of the list of previously created "item" elements. I would now like the new elements to be added to the top of the list. So far i've tried using: insertBefore() but i'm still getting

[PHP] Multiple file upload

2009-11-11 Thread Matthew Croud
Dear lords of PHP, I have a working image upload script that meets all my needs, My question is I need to upload multiple images using the same form, This is the PHP part I have so far, largely taken from a book: _ $file_dir = "/public_htm

[PHP] opposite of quotemeta ?

2009-10-29 Thread Matthew Croud
Hi, In my script I want the user to enter some html which is saved to a file, I've noticed that php rather cleverly escapes the speech marks, so: Google becomes: Google Is there some function which prevents or reverts this ? something similar to html_entities maybe? Many thanks! Matt

Re: [PHP] Re: Fun with XSLT

2009-10-22 Thread Matthew Croud
On 22 Oct 2009, at 16:39, Peter Ford wrote: Matthew Croud wrote: Hi Guys, Well i;ve been slaving on with my PHP XML endeavors and i'm loving it, just finishing the meaty parts of my XSLT for dummies book too. I have a question which asks "is it possible?". Using XSL

[PHP] Fun with XSLT

2009-10-22 Thread Matthew Croud
Hi Guys, Well i;ve been slaving on with my PHP XML endeavors and i'm loving it, just finishing the meaty parts of my XSLT for dummies book too. I have a question which asks "is it possible?". Using XSLT I can collect specific parts of my XML using something sexy like . Lets say however, t

[PHP] Display HTML in XSL Style Sheet

2009-10-06 Thread Matthew Croud
Hi, Is there a way to store HTML in an XML file, Access that node using XLST, and have it display as rendered html ? So far my attempts either return the text equivalent of the html, with nothing rendered. Cheers, Matt. -- PHP General Mailing List (http://www.php.net/) To unsubscribe,

[PHP] Spry, XML, PHP and XSLT Hell

2009-10-06 Thread Matthew Croud
Okey Doke, I'll try and be brief, Well, my client agreed to a small online store that would hold the same stock items where only the quantities would differ, we agreed that, due to infrequent changes, I would make pages for any new items, and she would control stock etc using an e-shopping

[PHP] Spry, XML, PHP and XSLT Hell

2009-10-05 Thread Matthew Croud
Hello, Is there anyone here who uses Spry with XML and PHP and understands XSLT, At the moment i'm in development hell and have a rather bloated question to ask someone who is knowledgeable in the above areas. My head is about to explode and I can't find any answers, If there are Spry/XML f

Re: [PHP] XML. Prevent < from turning into <

2009-09-09 Thread Matthew Croud
On 9 Sep 2009, at 16:37, Ashley Sheridan wrote: On Wed, 2009-09-09 at 15:14 +0100, Matthew Croud wrote: On 9 Sep 2009, at 15:09, Ashley Sheridan wrote: On Wed, 2009-09-09 at 14:46 +0100, Matthew Croud wrote: On 9 Sep 2009, at 14:36, Bob McConnell wrote: From: Bastien Koert On Wed, Sep 9

Re: [PHP] XML. Prevent < from turning into <

2009-09-09 Thread Matthew Croud
On 9 Sep 2009, at 14:36, Bob McConnell wrote: From: Bastien Koert On Wed, Sep 9, 2009 at 5:27 AM, Matthew Croud wrote: Hiya, I'm writing an app that let's my client upload images, the image html code is added to an XML file. Take a look at the element below: e1022

Re: [PHP] XML. Prevent < from turning into <

2009-09-09 Thread Matthew Croud
On 9 Sep 2009, at 14:26, Bastien Koert wrote: On Wed, Sep 9, 2009 at 5:27 AM, Matthew Croud wrote: Hiya, I'm writing an app that let's my client upload images, the image html code is added to an XML file. Take a look at the element below: e1022 Blue Ski Trouse

[PHP] XML. Prevent < from turning into <

2009-09-09 Thread Matthew Croud
Hiya, I'm writing an app that let's my client upload images, the image html code is added to an XML file. Take a look at the element below: e1022 Blue Ski Trousers 8.99 Now, whenever PHP writes this to the XML files, it turns the < and > into < and > . which means it

Re: [PHP] Return XML attribute in DOM

2009-09-08 Thread Matthew Croud
Cheers Guys, Your the greatest ! On 8 Sep 2009, at 09:08, Peter Ford wrote: Matthew Croud wrote: Doesn't the DOM have the getAttribute() method? Thanks, Ash http://www.ashleysheridan.co.uk It's not in my reference, though I see it in the PHP manual now. This is w

Re: [PHP] Return XML attribute in DOM

2009-09-07 Thread Matthew Croud
Doesn't the DOM have the getAttribute() method? Thanks, Ash http://www.ashleysheridan.co.uk It's not in my reference, though I see it in the PHP manual now. This is what I have: _ $dom = new DomDocument(); $dom -> load("items.xml"); $topics = $dom -> getElementsB

[PHP] Return XML attribute in DOM

2009-09-07 Thread Matthew Croud
I'm at my wits end here, so close to the finishing line! Is there a method to return an attribute value of an XML node using DOM, I can check to see if an attribute exists using hasAttributes() But I can't retrieve the value. I'm so desperate i've started to eat dirt. Many thanks, Matt

Re: [PHP] Some help with SimpleXML :`(

2009-09-04 Thread Matthew Croud
Well, you guys are awesome. So the script below doesn't cause any errors (nice), however it doesn't save the newly added child to the xml file (items.xml): $xml = simplexml_load_file("items.xml"); $item = $xml->addChild('item'); $item->addChild('name', $name); $item->addChild('desc', $des

[PHP] Some help with SimpleXML :`(

2009-09-03 Thread Matthew Croud
Hi foks, Could someone lend me a little hand with simpleXML ? I've been looking at examples in the PHP manual and W3C, i'm at the pinnacle of figuring it out but alas i need a hand from the mailing list dudes. My aim is to add another "item" node, so i'll start with my XML file called "it

[PHP] Host that allows edit of php.ini

2009-07-08 Thread Matthew Croud
Apologies if this type of question is frowned upon in the mailing list, however I would like to pop the question to those in the know. Can anyone recommend a UK host that allows you to edit ( or a copy of ) the php.ini file, allowing me to increase the file upload size to 100mb for clients PDF

[PHP] Advise on starting a web store site

2009-07-06 Thread Matthew Croud
Hi, I'm going to start my first e commerce website for a small web shoe store. I think I know enough PHP to keep my head above water, I'm using an add on shopping cart package to deal with the transactions. My question is, what's the best way to design a site where each product appears to

Re: [PHP] difference between two times? Date_diff and DateTime::diff

2009-06-16 Thread Matthew Croud
Wonderful, thanks Ian for your function, and also thank you Tom for having a head scratch on my behalf ;) On 16 Jun 2009, at 16:20, Ian wrote: On 16 Jun 2009 at 14:05, Matthew Croud wrote: Hi Dajve and Tom, Thanks again, I totally didn't realise that this function is yet to

Re: [PHP] difference between two times? Date_diff and DateTime::diff

2009-06-16 Thread Matthew Croud
ss you have your own server running PHP, it won't be available to use (hopefully - I would be sceptical of any webhost which rolls out RCs on production servers). If you need to know what version of PHP you're running, use: phpversion() or phpinfo() -----Original Message-

Re: [PHP] difference between two times? Date_diff and DateTime::diff

2009-06-16 Thread Matthew Croud
27;d try and help out. You'll learn a lot from reading this list as well. Cheers and good luck, Tom 2009/6/16 Matthew Croud Hello, My journey of learning PHP is going well, so i've decided to make a small program which works out the difference between two times and records the data

[PHP] difference between two times? Date_diff and DateTime::diff

2009-06-16 Thread Matthew Croud
Hello, My journey of learning PHP is going well, so i've decided to make a small program which works out the difference between two times and records the data in a text file. I've searched the PHP manual for functions which can help me out, and I discovered the function Date_diff ( http:

Re: [PHP] Question about template systems

2009-03-03 Thread Matthew Croud
Excellent, thanks for your help guys, you've been really helpful :) On 3 Mar 2009, at 10:20, Marcus Gnaß wrote: Matthew Croud wrote: Hello, First post here, I'm in the process of learning PHP , I'm digesting a few books as we speak. I'm working on a content heavy web

[PHP] Question about template systems

2009-03-03 Thread Matthew Croud
Hello, First post here, I'm in the process of learning PHP , I'm digesting a few books as we speak. I'm working on a content heavy website that provides a lot of information, a template system would be great and so i've been looking at ways to create dynamic data with a static navigation sy