[PHP] What is wrong with this code?

2010-04-28 Thread Gary .
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)) { $text =

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

2010-04-28 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?

2010-04-28 Thread Peter Lind
On 28 April 2010 08:39, Gary . php-gene...@garydjones.name 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,

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 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 .
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'); [...] unfortunately you cannot use a

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

2010-04-28 Thread Peter Lind
On 28 April 2010 10:57, Gary . php-gene...@garydjones.name 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 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 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 something very like

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 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't this be:

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-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: 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

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 »

[PHP] What is wrong with this code

2009-04-03 Thread Gary
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? form method=post action=?php echo $_SERVER['PHP_SELF']; ? div id=important style=visibility:hidden; pIf you can see

Re: [PHP] What is wrong with this code

2009-04-03 Thread Igor Escobar
You forgot to mention the method of the form. form action=... method=post ... /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

Re: [PHP] What is wrong with this code

2009-04-03 Thread Gary
Its there... Igor Escobar titiolin...@gmail.com wrote in message news:1f5251d50904031212o6fcc3e43q5c60b7ae373e9...@mail.gmail.com... You forgot to mention the method of the form. form action=... method=post ... /form Regards, Igor Escoar Systems Analyst Interface Designer --

RE: [PHP] What is wrong with this code

2009-04-03 Thread kyle.smith
] 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 titiolin...@gmail.com wrote in message news:1f5251d50904031212o6fcc3e43q5c60b7ae373e9...@mail.gmail.com... You forgot to mention the method of the form

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 Igor Escobar
Subject: Re: [PHP] What is wrong with this code Its there... Igor Escobar titiolin...@gmail.com wrote in message news:1f5251d50904031212o6fcc3e43q5c60b7ae373e9...@mail.gmail.com... You forgot to mention the method of the form. form action=... method=post ... /form Regards, Igor Escoar

RE: [PHP] What is wrong with this code

2009-04-03 Thread kyle.smith
: [PHP] What is wrong with this code I recieve an email, it will contain the ip address, it will also contain the name:, email: , comments: but not the information from the form of the name or email or comments. The database also recieves only the ip address. So I assume those parts are working

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? form method=post action=?php echo $_SERVER['PHP_SELF']; ? div id=important

Re: [PHP] What is wrong with this code

2009-04-03 Thread Gary
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 there... Igor Escobar titiolin...@gmail.com wrote in message news

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. *

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 Peter van der Does
On Fri, 3 Apr 2009 15:08:45 -0400 Gary gwp...@ptd.net 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

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

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 --

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 le...@phpxperts.net wrote in message news:79d892150904031305j6e1b00d4qed0d9fbf13437...@mail.gmail.com...

RE: [PHP] What is wrong with this code

2009-04-03 Thread kyle.smith
] 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.ubuntu.com

Re: [PHP] What is wrong with next code

2004-11-02 Thread Vladimir Shiray
Have anyone answers on the strange behaviour discussed in the thread ? I has noted specially: It works OK in PHP 4.3.6 or when line $db2 = 0; had been commented in all described versions of PHP. So next example works perfect: -

Re: [PHP] What is wrong with next code

2004-10-29 Thread Vladimir Shiray
I has noted specially: It works OK in PHP 4.3.6 or when line $db2 = 0; had been commented in all described versions of PHP. So next example works perfect: - error_reporting(E_ALL); $db1 = mysql_connect ('localhost', 'test', '1'); $db2 =

[PHP] What is wrong with next code

2004-10-28 Thread Vladimir Shiray
Can one explain me why I has got a result: - Warning: mysql_query(): 4 is not a valid MySQL-Link resource in ... $result = mysql_query('SELECT 1+1', $db1); - from next example. The example does not

Re: [PHP] What is wrong with next code

2004-10-28 Thread John Holmes
Vladimir Shiray wrote: - Warning: mysql_query(): 4 is not a valid MySQL-Link resource in ... $result = mysql_query('SELECT 1+1', $db1); - [snip] $db1 = mysql_connect ('localhost', 'test', '1'); $db2 =

[PHP] What is wrong with this code ?

2003-09-15 Thread Daniel Szasz
Hello What is wrong with this code ? $doWork = $_GET[doWork]; echo $doWork; echo ( BR); if ( $doWork = 0) { exit; } else { if ( $doWork = 1) { ? input class=no type=button value=Accept onClick=doAccept(); input class=no type=button value=Reject onClick=doReject(); ? }; if (

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 ( BR); if ( $doWork = 0) { You just assigned 0 to $doWork, try using 0 == $doWork exit; }

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 Carl Furst
an OR statement/gate; Carl. -Original Message- From: Daniel Szasz [mailto:[EMAIL PROTECTED] Sent: Monday, September 15, 2003 3:29 PM To: [EMAIL PROTECTED] Subject: [PHP] What is wrong with this code ? Hello What is wrong with this code ? $doWork = $_GET[doWork]; echo $doWork; echo