Re: [PHP] Issue with STRFTIME and Daylight Savings

2007-12-02 Thread Robert Cummings
On Mon, 2007-12-03 at 15:14 +1000, Malcolm Green wrote: > Hi Support: > > I've moved into a new role and inherited a system which uses the 'STRFTIME' > function to create a filename in the form 'strftime("%Y%m%d")'; the > filename is supposed to be "today's date". (Note I've left out the file > ex

[PHP] Issue with STRFTIME and Daylight Savings

2007-12-02 Thread Malcolm Green
Hi Support: I've moved into a new role and inherited a system which uses the 'STRFTIME' function to create a filename in the form 'strftime("%Y%m%d")'; the filename is supposed to be "today's date". (Note I've left out the file extension for clarity.) I've noticed that system creates the wrong f

Re: [PHP] Structured Code vs. Performance

2007-12-02 Thread tedd
At 8:56 PM -0300 12/2/07, Martin Alterisio wrote: 2007/12/2, tedd <[EMAIL PROTECTED]>: To me, good structure starts at the function level. Like the lattice of a crystal, coding grows and reflects the most basic element. Keep that element consistent and you'll find that

Re: [PHP] Structured Code vs. Performance

2007-12-02 Thread Martin Alterisio
2007/12/2, tedd <[EMAIL PROTECTED]>: > > > To me, good structure starts at the function level. Like the lattice > of a crystal, coding grows and reflects the most basic element. Keep > that element consistent and you'll find that it will be reflected in > everything you do. > > How's that for philo

Re: [PHP] sprintf() oddness

2007-12-02 Thread Martin Alterisio
2007/12/1, Christoph Boget <[EMAIL PROTECTED]>: > > Why does > > sprintf( '%.03f', 0.1525 ) > > return 0.152 while > > sprintf( '%.03f', 0.1575 ) > > return 0.158? > Welcome to the world of f floating point numbers. Discrete mathematics, leave all hope, ye that enter. It's the way fl

RE: [PHP] including parenthesis, space and dashes in a phone number

2007-12-02 Thread Daevid Vincent
I should have been more clear. I do *store* the numbers sans punctuation, but that's trivial to accomplish as we've seen. I do like to display it however with the nice parens and hyphens. Hence "opposite". :) > -Original Message- > From: afan pasalic [mailto:[EMAIL PROTECTED] > Sent: Fr

RE: [PHP] including parenthesis, space and dashes in a phone number

2007-12-02 Thread Daevid Vincent
> -Original Message- > From: Warren Vail [mailto:[EMAIL PROTECTED] > Sent: Friday, November 30, 2007 2:17 PM > To: 'Jochem Maas' > Cc: 'afan pasalic'; 'Daevid Vincent'; 'php-general' > Subject: RE: [PHP] including parenthesis, space and dashes in > a phone number > > I did not know th

Re: [PHP] Join question

2007-12-02 Thread tedd
At 6:24 AM +0800 12/3/07, Crayon Shin Chan wrote: It was also helped by the fact that the OP, who is apparently, renowned for programming in rocks since the time before binary was invented, ought to know list etiquette better than most. That's "world renowned", if you please. :-) But just to

Re: [PHP] Join question

2007-12-02 Thread Crayon Shin Chan
On Sunday 02 December 2007, Daniel Brown wrote: > There are a great deal of highly-intelligent people on this list, so why > not take advantage of that resource? I do, that's why I'm on the list. > So until you've been around enough to truly earn your right to > tell someone far more accomp

[PHP] 5.2.5 failed 7 tests

2007-12-02 Thread Bill
Do failed tests mean I absolutely should NOT install. Or is it normal to have a few fails? Try two different versions, all have some failure. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Structured Code vs. Performance

2007-12-02 Thread tedd
At 8:56 AM +0100 11/29/07, <[EMAIL PROTECTED]> wrote: Looks for me a bit like a philosophical question, but maybe you have something to say about it nevertheless. A good thing for me would be something like: up to 125 lines of code you get an adequate performance with simply parsing it every time

Re: [PHP] Join question

2007-12-02 Thread Crayon Shin Chan
On Saturday 01 December 2007, chris smith wrote: > Considering the rest of the off-topic questions that regularly get > asked on this list it's a bit much to single out this one particular > post. I didn't single it out, it just happened to be at the top of the pile at the the time. It was also h

Re: [PHP] checkbox unchecked

2007-12-02 Thread tedd
At 1:23 PM -0800 12/2/07, Casey wrote: On Dec 2, 2007 1:08 PM, tedd <[EMAIL PROTECTED]> wrote: You don't need to do anything. When it's submitted: That's true unless you're pulling data in from somewhere else (i.e., a dB). Cheers, tedd -- --- http://sperling.com http://ancientstones.c

[PHP] PHP/Perl

2007-12-02 Thread lists
Hi, Job onsite at Telecom giant in Finland (guess what telecom giant). Please see http://jobs.perl.org/job/7322 for more info. Send CV if you're interested to [EMAIL PROTECTED] /Peter -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] checkbox unchecked

2007-12-02 Thread Casey
On Dec 2, 2007 1:08 PM, tedd <[EMAIL PROTECTED]> wrote: > At 12:36 PM -0600 12/2/07, Larry Garfield wrote: > >First of all, using "y" and "n" for boolean values (such as a checkbox) is > >very sloppy. "n" is boolean True. A boolean value should evaluate correctly > >in a boolean context. For tha

Re: [PHP] sprintf() oddness

2007-12-02 Thread tedd
At 6:08 AM -0500 12/2/07, Christoph wrote: If the general rule is to round up for 5s when preceeding is odd and round down when even, that's not occuring here when using round(). No, you're not reading what I wrote. I said MY general rule is to round up when the preceding digit is even, wher

Re: [PHP] checkbox unchecked

2007-12-02 Thread tedd
At 12:36 PM -0600 12/2/07, Larry Garfield wrote: First of all, using "y" and "n" for boolean values (such as a checkbox) is very sloppy. "n" is boolean True. A boolean value should evaluate correctly in a boolean context. For that, you should use 1 and 0 for your values. What I usually do i

Re: [PHP] checkbox unchecked

2007-12-02 Thread Jürgen Wind
nice! but to avoid confusion it should read (assuming that $checked is a boolean variable): /> IMHO Larry Garfield wrote: > > First of all, using "y" and "n" for boolean values (such as a checkbox) is > very sloppy. "n" is boolean True. A boolean value should evaluate > correctly > in a b

Re: [PHP] checkbox unchecked

2007-12-02 Thread Steve Edberg
Just to add my two cents - I don't think it matters much what tokens you use to represent true or false, since you're going to be explicitly checking them on the server end anyway. I can't see much difference in principle between, for example: if ($_GET['foo'] == 'y')... and

Re: [PHP] include "config.php" does not work anymore after PHP 5.2

2007-12-02 Thread Mike Yrabedra
on 12/2/07 2:22 AM, wmac at [EMAIL PROTECTED] wrote: > > Hello, > > I have been working with PHP 5.0 and my "register_globals" has always been > Off since PHP 4.1 > > Today I upgraded to PHP 5.2 and now neither of my include "config.php" work. > > Neither of the variables defined in include fi

Re: [PHP] checkbox unchecked

2007-12-02 Thread Larry Garfield
First of all, using "y" and "n" for boolean values (such as a checkbox) is very sloppy. "n" is boolean True. A boolean value should evaluate correctly in a boolean context. For that, you should use 1 and 0 for your values. What I usually do is this: /> Then when it gets submitted, foo w

Re: [PHP] checkbox unchecked

2007-12-02 Thread Ronald Wiplinger
Stephen wrote: > Ronald Wiplinger wrote: >> How can I force a "n" for not checked in the input field? or how can I >> solve that? >> > Either use radio buttons or a drop down for the input field. Thanks! > > Stephen > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] checkbox unchecked

2007-12-02 Thread Afan Pasalic
I did once, if I remember once, this "strategy": > If checked, you will have value "y". Though, if unchecked, or it was checked and visitor unchecked, the value should be "n". ;) -afan Ronald Wiplinger wrote: I have now tried to add many of the security hints on a web page and come to a pr

Re: [PHP] checkbox unchecked

2007-12-02 Thread Stephen
Ronald Wiplinger wrote: How can I force a "n" for not checked in the input field? or how can I solve that? Either use radio buttons or a drop down for the input field. Stephen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] checkbox unchecked

2007-12-02 Thread Ronald Wiplinger
I have now tried to add many of the security hints on a web page and come to a problem. I am checking if the allowed fields match the sent fields. >From the database I get the information if a checkbox is checked or not: If the user takes out the checkmark the value will become "" and the fiel

[PHP] Need help for DOM xsd validation

2007-12-02 Thread Matthias Reindl
Hi, I'm trying to load XML data into my script. That's no problem. The problem is, that the schema validation fails all time after loading a new document: Warning: DOMDocument::schemaValidate() [function.DOMDocument-schemaValidate]: Element '{http://www.desktopportal.de/Preferences}user': T

Re: [PHP] include "config.php" does not work anymore after PHP 5.2

2007-12-02 Thread Richard Heyes
I never never thought my config.php might have problem. I have used this config.php for almost 6 years and never had problem (the first time I have forgotten to add it 6 years ago because I had migrated from ASP. I have copied this wrong config.php to some other projects. Have you ever migrated

Re: [PHP] sprintf() oddness

2007-12-02 Thread Christoph
The 4th significant digit in both cases is '5' but in the first case, it's rounded down but in the second case it is rounded up. Is sprintf() basing it's decision on the value of the 3rd significant digit? If so, why? Shouldn't rounding decisions be based on subsequent digits and not preceding

[PHP] Need help for DOM xsd validation

2007-12-02 Thread Matthias Reindl
Hi, I'm trying to load XML data into my script. That's no problem. The problem is, that the schema validation fails all time after loading a new document: Warning: DOMDocument::schemaValidate() [function.DOMDocument-schemaValidate]: Element '{http://www.desktopportal.de/Preferences}user

RE: [PHP] include "config.php" does not work anymore after PHP 5.2

2007-12-02 Thread Andrés Robinet
> -Original Message- > From: wmac [mailto:[EMAIL PROTECTED] > Sent: Sunday, December 02, 2007 6:35 AM > To: php-general@lists.php.net > Subject: Re: [PHP] include "config.php" does not work anymore after PHP > 5.2 > > > Thank you People. Someone mentioned the problem. > > It is the start

Re: [PHP] include "config.php" does not work anymore after PHP 5.2

2007-12-02 Thread wmac
Thank you People. Someone mentioned the problem. It is the starting PHP tag. I never never thought my config.php might have problem. I have used this config.php for almost 6 years and never had problem (the first time I have forgotten to add it 6 years ago because I had migrated from ASP. I have

[PHP] Re: include "config.php" does not work anymore after PHP 5.2

2007-12-02 Thread Siamak Sarmady
Hello This is the same thing I always use. By the way, I installed php 4.4.7 and everything is fine with this version though "register_globals" is again Off. Regards, Mac -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] include "config.php" does not work anymore after PHP 5.2

2007-12-02 Thread Casey
Okay... show us config.php. On Dec 1, 2007 11:22 PM, wmac <[EMAIL PROTECTED]> wrote: > > Hello, > > I have been working with PHP 5.0 and my "register_globals" has always been > Off since PHP 4.1 > > Today I upgraded to PHP 5.2 and now neither of my include "config.php" work. > > Neither of the var