Re: [PHP] file_put_contents problem

2009-09-14 Thread J DeBord
On Mon, Sep 14, 2009 at 4:19 PM, Andres Gonzalez wrote: > I have read in the contents of a file using file_get_contents. I can verify > that the data has actually been read in by echoing its contents. > > But then if I do this: > > $ret = file_put_contents("/tmp/bla", $bk); > > The return value gi

Re: [PHP] RE: [Formaldehyde] The Most Basic Ajax - PHP Error Debugger

2009-09-13 Thread J DeBord
On Mon, Sep 14, 2009 at 2:05 AM, tedd wrote: > At 10:49 PM +0200 9/13/09, Andrea Giammarchi wrote: > >> I was expecting somebody that develop massive Ajax application, not a link >> with 3 pages and zero point about the reply. >> > > You asked if anyone did any ajax? So, I replied and provided yo

Re: [PHP] RE: [Formaldehyde] The Most Basic Ajax - PHP Error Debugger

2009-09-12 Thread J DeBord
On Sat, Sep 12, 2009 at 8:47 PM, Jim Lucas wrote: > Andrea Giammarchi wrote: > >> something I cannot find in any other library or framework. >> > > This should tell you something then... > > If something like Formandehyde isn't useful, then why is Charles so popular (note: popular from my perspec

Re: [PHP] htaccess question

2009-09-11 Thread J DeBord
On Fri, Sep 11, 2009 at 4:46 PM, tedd wrote: > Hi gang: > > Is there a way I can use a htaccess directive to require a php script to be > "included" within each file contained within that directory? > > For example, let's say I have a directory with 100 scripts in it, but I > want each script wit

Re: [PHP] PHP6 Stable Release Schedule

2009-09-05 Thread J DeBord
On Sat, Sep 5, 2009 at 6:19 PM, Richard Heyes wrote: > Hi, > > > E_STRICT is now part of E_ALL > > *In PHP 6 * > Oopsy. Shows how much PHP I do these days... > > -- > Richard Heyes > HTML5 graphing: RGraph - www.rgraph.net (updated 5th September) > Lots of PHP and Javascript code - http://www.ph

[PHP] Some help with SimpleXML :`(

2009-09-04 Thread J DeBord
On Fri, Sep 4, 2009 at 10:23 AM, Matthew Croud wrote: > > 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('i

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

2009-09-03 Thread J DeBord
You almost had it... Since clothes is the root element you can think of your initial $xml as . So, you add a child to it. That error message is kinda cryptic though. Red Gloves a pair of red gloves adult 12.99 Snow Boots some snow boots child 23.99 EOD; $sxm

Re: [PHP] Date Comparison

2009-09-03 Thread J DeBord
Telling someone RTFM is just rude and mean. Manipulating dates and times can be confusing for beginners and experienced people alike. I would suggest that when a question asked here causes you to respond with RTFM, don't respond at all. Save yourself the time and trouble and save the person asking

Re: [PHP] Calling extension function from another

2009-08-29 Thread J DeBord
On Sat, Aug 29, 2009 at 10:14 AM, leledumbo wrote: > > extension A has function a, extension B has function b. How can I make b > calls a? What is an extension? > > -- > View this message in context: > http://www.nabble.com/Calling-extension-function-from-another-tp25185839p25200892.html > Sen

Re: [PHP] Re: Best way to test for form submission?

2009-08-28 Thread J DeBord
I've heard stories like this before, but never encountered it myself. I forgot to mention that it is a good idea to give your submit buttons a "value" attribute. Regardless of how the form is submitted, you should then have a value for ['submit']. Reminding the user that they must do anything oth

Re: [PHP] Re: Best way to test for form submission?

2009-08-28 Thread J DeBord
If you want to check that a *form* was submiited, you need to at minimum check that one of the form elements exist in the post data, assuming the method is post. The submit button is a good one to use. Just checking that there *is* POST data isn't a great idea. Anyone can post anything. Checking fo