Re: [PHP] What is wrong with this code?

2010-04-28 Thread Gary .
On Wed, Apr 28, 2010 at 2:17 PM, Thijs Lensselink wrote: > Gary . wrote: >> On 4/28/10, Thijs Lensselink wrote: >>> Gary . wrote: class Pg_Error {    private static $errors =        array(INTEGRITY_CONST_UNIQUE => 'uniqueness constraint violated'); >>> >>> Shouldn

Re: [PHP] What is wrong with this code?

2010-04-28 Thread Thijs Lensselink
Gary . wrote: On 4/28/10, Thijs Lensselink wrote: Gary . wrote: class Pg_Error { private static $errors = array(INTEGRITY_CONST_UNIQUE => 'uniqueness constraint violated'); Shouldn't this be: array(self::INTEGRITY_CONST_UNIQUE => 'uniqueness constraint violated');

Re: [PHP] What is wrong with this code?

2010-04-28 Thread Gary .
On 4/28/10, Thijs Lensselink wrote: > Gary . wrote: >> class Pg_Error >> { >> private static $errors = >> array(INTEGRITY_CONST_UNIQUE => 'uniqueness constraint violated'); >> > Shouldn't this be: > > array(self::INTEGRITY_CONST_UNIQUE => 'uniqueness constraint violated'); Yes, or some

Re: [PHP] What is wrong with this code?

2010-04-28 Thread Thijs Lensselink
Gary . wrote: class Pg_Error { private static $errors = array(INTEGRITY_CONST_UNIQUE => 'uniqueness constraint violated'); Shouldn't this be: array(self::INTEGRITY_CONST_UNIQUE => 'uniqueness constraint violated'); ... public static function getMessage($ec) { $

Re: [PHP] What is wrong with this code?

2010-04-28 Thread Peter Lind
On 28 April 2010 10:57, Gary . wrote: > On 4/28/10, Jochem Maas wrote: >>>     >> class Pg_Error >>>     >> { >>>        const INTEGRITY_CONST_UNIQUE = '23505'; >> >> this is a class constant >> >>>     >>     private static $errors = >>>     >>         array(INTEGRITY_CONST_UNIQUE => 'uniqueness

Re: [PHP] What is wrong with this code?

2010-04-28 Thread Gary .
On 4/28/10, Jochem Maas wrote: >> >> class Pg_Error >> >> { >>const INTEGRITY_CONST_UNIQUE = '23505'; > > this is a class constant > >> >> private static $errors = >> >> array(INTEGRITY_CONST_UNIQUE => 'uniqueness constraint >> violated'); [...] > unfortunate

Re: [PHP] What is wrong with this code?

2010-04-28 Thread Gary .
On 4/28/10, Jochem Maas wrote: > Op 4/28/10 7:39 AM, Gary . schreef: >> class Pg_Error >> { const INTEGRITY_CONST_UNIQUE = '23505'; >> private static $errors = >> array(INTEGRITY_CONST_UNIQUE => 'uniqueness constraint violated'); >> ... >> public static function getMessage($ec)

Re: [PHP] What is wrong with this code?

2010-04-28 Thread Gary .
Per Jessen wrote: > Gary . wrote: >> Calling it, the array_key_exists call always returns false ... >> and I can't see what I've done wrong :( > > Might this be better: > > public static function getMessage($ec) > { > $text = ''; > if (array_key_exists($ec, $errors)) >

Re: [PHP] What is wrong with this code?

2010-04-28 Thread Peter Lind
On 28 April 2010 08:39, Gary . wrote: > class Pg_Error > { >    private static $errors = >        array(INTEGRITY_CONST_UNIQUE => 'uniqueness constraint violated'); > ... >    public static function getMessage($ec) >    { >        $text = ''; >        if (array_key_exists($ec, Pg_Error::$errors))

Re: [PHP] What is wrong with this code?

2010-04-27 Thread Per Jessen
Gary . wrote: > class Pg_Error > { > private static $errors = > array(INTEGRITY_CONST_UNIQUE => 'uniqueness constraint > violated'); > ... > public static function getMessage($ec) > { > $text = ''; > if (array_key_exists($ec, Pg_Error::$errors)) >

Re: [PHP] What is wrong with this code

2009-04-18 Thread Manuel Lemos
Hello, 9el wrote: > *Note:* It is worth noting that the mail() function is not suitable for > larger volumes of email in a loop. This function opens and closes an SMTP > socket for each email, which is not very efficient. > For the sending of large amounts of email, see the » PEAR::Mail, and » > P

Re: [PHP] What is wrong with this code

2009-04-18 Thread Reese
9el wrote: But in practice. I mean in real life you'll find the mail() function is disabled in most servers :) That's nice, but how many is "larger volumes of email"? 500? 5,000? 25,000? I note PEAR:Mail has 3 open bugs, PEAR:Mail_Mime has 23 with 3 open support requests. PHPMailer was mention

Re: [PHP] What is wrong with this code

2009-04-18 Thread 9el
But in practice. I mean in real life you'll find the mail() function is disabled in most servers :)

Re: [PHP] What is wrong with this code

2009-04-18 Thread Reese
9el wrote: *Note:* It is worth noting that the mail() function is not suitable for larger volumes of email in a loop. This function opens and closes an SMTP socket for each email, which is not very efficient. For the sending of large amounts of email, see the » PEAR::Mail, and » PEAR::Mail_Queue

RE: [PHP] What is wrong with this code

2009-04-03 Thread kyle.smith
[PHP] What is wrong with this code --- Use FreeOpenSourceSoftwares, Stop piracy, Let the developers live. Get a Free CD of Ubuntu mailed to your door without any cost. Visit : www.ubunt

Re: [PHP] What is wrong with this code

2009-04-03 Thread Gary
That was it, but Im sorry, I did not see that Ray had already pointed that out, so apologies to Ray and many thanks to everyone... gary "9el" wrote in message news:79d892150904031305j6e1b00d4qed0d9fbf13437...@mail.gmail.com... >

Re: [PHP] What is wrong with this code

2009-04-03 Thread 9el
--- Use FreeOpenSourceSoftwares, Stop piracy, Let the developers live. Get a Free CD of Ubuntu mailed to your door without any cost. Visit : www.ubuntu.com -- On

Re: [PHP] What is wrong with this code

2009-04-03 Thread Gary
Peter I had the if ( isset( $_POST['submit'] ) ) { in there and it did not work. I have used this on several sites, the only difference is that I was tyring to contain it in one file. I also created a file just to process the POST, but it still did not work. I was thinkning it was something

Re: [PHP] What is wrong with this code

2009-04-03 Thread Peter van der Does
On Fri, 3 Apr 2009 15:08:45 -0400 "Gary" wrote: > This is driving me nuts. I am getting blank emails and the only > information that is being passed to MySQL is the IP address. > > Can someone tell me what is wrong with this? > If this is in one file, as I assume it is, here's what is happeni

RE: [PHP] What is wrong with this code

2009-04-03 Thread kyle.smith
This is unrelated, the email sends fine. And it's one per submission. -Original Message- From: doctortomor...@gmail.com [mailto:doctortomor...@gmail.com] On Behalf Of 9el Sent: Friday, April 03, 2009 3:37 PM To: Gary Cc: php-general@lists.php.net Subject: Re: [PHP] What is wrong

Re: [PHP] What is wrong with this code

2009-04-03 Thread 9el
*Note:* It is worth noting that the mail() function is not suitable for larger volumes of email in a loop. This function opens and closes an SMTP socket for each email, which is not very efficient. For the sending of large amounts of email, see the » PEAR::Mail, and » PEAR::Mail_Queue packages. * N

Re: [PHP] What is wrong with this code

2009-04-03 Thread Gary
ng like print_r on $_POST to see if it contains *anything*, >> seems like it's empty?! >> >> Also, when you say blank emails I assume you mean they have the template >> you made but the variables are empty and not zero-length emails. >> >> -Original Mes

Re: [PHP] What is wrong with this code

2009-04-03 Thread Ray
On Friday 03 April 2009 13:08:45 Gary wrote: > This is driving me nuts. I am getting blank emails and the only > information that is being passed to MySQL is the IP address. > > Can someone tell me what is wrong with this? > > > >If you can see this, it's an anti-spam measure. Please don't

RE: [PHP] What is wrong with this code

2009-04-03 Thread kyle.smith
e it's empty?! Also, when you say blank emails I assume you mean they have the template you made but the variables are empty and not zero-length emails. -Original Message- From: Gary [mailto:gwp...@ptd.net] Sent: Friday, April 03, 2009 3:14 PM To: php-general@lists.php.net Subject: Re:

Re: [PHP] What is wrong with this code

2009-04-03 Thread Igor Escobar
p...@ptd.net] > Sent: Friday, April 03, 2009 3:14 PM > To: php-general@lists.php.net > Subject: Re: [PHP] What is wrong with this code > > Its there... > > > "Igor Escobar" wrote in message > news:1f5251d50904031212o6fcc3e43q5c60b7ae373e9...@mail.gmail.co

Re: [PHP] What is wrong with this code

2009-04-03 Thread Gary
emails I assume you mean they have the template you made but the variables are empty and not zero-length emails. -Original Message- From: Gary [mailto:gwp...@ptd.net] Sent: Friday, April 03, 2009 3:14 PM To: php-general@lists.php.net Subject: Re: [PHP] What is wrong with this code Its

RE: [PHP] What is wrong with this code

2009-04-03 Thread kyle.smith
d.net] Sent: Friday, April 03, 2009 3:14 PM To: php-general@lists.php.net Subject: Re: [PHP] What is wrong with this code Its there... "Igor Escobar" wrote in message news:1f5251d50904031212o6fcc3e43q5c60b7ae373e9...@mail.gmail.com... > You forgot to mention the &q

Re: [PHP] What is wrong with this code

2009-04-03 Thread Gary
Its there... "Igor Escobar" wrote in message news:1f5251d50904031212o6fcc3e43q5c60b7ae373e9...@mail.gmail.com... > You forgot to mention the "method" of the form. > > ... > > Regards, > Igor Escoar > Systems Analyst & Interface Designer > > -- > > Personal Blog > ~ blog.igorescobar.com > Onli

Re: [PHP] What is wrong with this code

2009-04-03 Thread Igor Escobar
You forgot to mention the "method" of the form. ... Regards, Igor Escoar Systems Analyst & Interface Designer -- Personal Blog ~ blog.igorescobar.com Online Portifolio ~ www.igorescobar.com Twitter ~ @igorescobar On Fri, Apr 3, 2009 at 4:08 PM, Gary wrote: > This is driving me nuts. I

RE: [PHP] What is wrong with this code ?

2003-09-15 Thread Carl Furst
If should use double equals for comparison.. if ($doWork == 1) { etc here}. Of course doing multiple tests like this you are better off using switch case... Switch ($doWork) { Case 0: Exit; Break; Case 1: DoOne($arguments);

Re: [PHP] What is wrong with this code ?

2003-09-15 Thread Miroslaw Milewski
Daniel Szasz wrote: > What is wrong with this code ? == instead of =. -- miro. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] What is wrong with this code ?

2003-09-15 Thread Robert Cummings
On Mon, 2003-09-15 at 15:29, Daniel Szasz wrote: > Hello > > What is wrong with this code ? > > $doWork = $_GET[doWork]; This is sloppy, put the quotes around the key string "doWork". > echo $doWork; > echo ( ""); > if ( $doWork = 0) { You just assigned 0 to $doWork, try using 0 == $doWork >