Re: [PHP] Best practice for if (!$stmt->execute())

2010-10-25 Thread Paul M Foster
On Tue, Oct 26, 2010 at 06:27:33AM +0200, Rico Secada wrote: > On Mon, 25 Oct 2010 22:56:37 -0400 > Paul M Foster wrote: > > > Bear in mind, an "error" is *never* that a query returned no data or > > data the user might consider bad. > > This is an important point. When is an "error" an actual

Re: [PHP] Best practice for if (!$stmt->execute())

2010-10-25 Thread Rico Secada
On Mon, 25 Oct 2010 22:56:37 -0400 Paul M Foster wrote: > Bear in mind, an "error" is *never* that a query returned no data or > data the user might consider bad. This is an important point. When is an "error" an actual error? When is it something that *needs* to be logged and mailed? > Paul >

Re: [PHP] Best practice for if (!$stmt->execute())

2010-10-25 Thread Paul M Foster
On Mon, Oct 25, 2010 at 06:06:24AM +0200, Rico Secada wrote: > Hi. > > I have been doing like this: > > if (!$stmt->execute()) { > return false; > } else { > > ... some code > > return true; > OR > return $foo; // Some int, string, whatever. > > } > > I am thinking about ch

Re: [PHP] Re: Check for existence of mail address

2010-10-25 Thread fake...@fakessh.eu
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Le 26.10.2010 04:24, Sharl.Jimh.Tsin a écrit : > You can try the smtpvalidate class provided by Jonathan Tapicer,But > maybe it is impossible in my opinion. > > PS:send test mail and check the fail-report by MTA server may be a > idea,but no good :) >

Re: [PHP] Re: Check for existence of mail address

2010-10-25 Thread Sharl.Jimh.Tsin
You can try the smtpvalidate class provided by Jonathan Tapicer,But maybe it is impossible in my opinion. PS:send test mail and check the fail-report by MTA server may be a idea,but no good :) Best regards, Sharl.Jimh.Tsin (From China) 2010/10/26 : > Hi Daniel, hi Jonathan, hi folks, > > many

[PHP] Re: Check for existence of mail address

2010-10-25 Thread webdev
Hi Daniel, hi Jonathan, hi folks, many THX for Your quick replies! On Mon, 25 Oct 2010 18:46:02 -0400, "Daniel P. Brown" wrote: > On Mon, Oct 25, 2010 at 18:38, wrote: > > > > Is there any other function which checks whether this > > address really exists? > > Of course not! Can you imag

Re: [PHP] Check for existence of mail address

2010-10-25 Thread Jonathan Tapicer
You can use this class: http://www.webdigi.co.uk/blog/wp-content/uploads/2009/01/smtpvalidateclassphp.txt It may not work for some SMTPs. It uses the concepts explained here: http://www.webdigi.co.uk/blog/2009/how-to-check-if-an-email-address-exists-without-sending-an-email/ On Mon, Oct 25, 2010

Re: [PHP] Check for existence of mail address

2010-10-25 Thread Daniel P. Brown
On Mon, Oct 25, 2010 at 18:38, wrote: > > Is there any other function which checks whether this > address really exists? Of course not! Can you imagine the implications, insecurities, and privacy concerns that would be associated with that? Some mailservers will confirm or deny if a local

[PHP] Check for existence of mail address

2010-10-25 Thread webdev
Hi, folks, I'm wondering how to checking existence of a given mail address like f...@bar.com . At 1st I tried: if f (filter_var ($maddr, FILTER_VALIDATE_EMAIL) === false) { /* some sort of error handling code here */ } where $maddr is the address to be checked. But this checks only synt

Re: [PHP] Re: Looking for an open-source project

2010-10-25 Thread Ken Guest
On Mon, Oct 25, 2010 at 7:57 PM, Colin Guthrie wrote: > 'Twas brillig, and Mert Oztekin at 25/10/10 13:23 did gyre and gimble: > > I am looking for an open-source project to help and make some fun. Anyone > has suggestions? > > How about helping out Zend Framework, adding useful classes for vario

Re: [PHP] Model View Concepts

2010-10-25 Thread J Ravi Menon
On Fri, Oct 22, 2010 at 3:03 AM, Ashley Sheridan wrote: > On Fri, 2010-10-22 at 10:16 +0200, Sebastian Detert wrote: > >> Hi all, >> >> I'm currently searching for any code snippets, tutorials, howtos, >> concepts which explain different ways to collect all type of data/input >> (i.e. inside a cla

[PHP] Re: Looking for an open-source project

2010-10-25 Thread Colin Guthrie
'Twas brillig, and Mert Oztekin at 25/10/10 13:23 did gyre and gimble: > I am looking for an open-source project to help and make some fun. Anyone has > suggestions? How about helping out Zend Framework, adding useful classes for various Service integrations etc.? Col -- Colin Guthrie gmane(a

Re: [PHP] Re: Possible foreach bug; seeking advice to isolate the problem

2010-10-25 Thread David Harkness
On Sat, Oct 23, 2010 at 6:48 PM, Jonathan Sachs <081...@jhsachs.com> wrote: > Now that I understand it, I can see the same thing would happen if I > wrote the equivalent code in C, and probably in Java. > Neither C nor Java have references as PHP does, and references in C++ cannot be changed to p

Re: [PHP] Stripslashes redundancy question.

2010-10-25 Thread Adam Richardson
> You can only call stripslashes once, and only if magic quotes is > enabled. Even if you can turn it off on your server, if there is any > chance your code will be used on other servers where it might not be > turned off, you need to wrap it with the test for magic quotes to make > it safe. We alw

Re: [PHP] Stripslashes redundancy question.

2010-10-25 Thread Shawn McKenzie
On 10/25/2010 09:49 AM, Paul M Foster wrote: > On Sun, Oct 24, 2010 at 09:33:23PM -0400, Adam Richardson wrote: > > > >> This >> was after many criticisms were leveled against the use of magic quotes: >> http://en.wikipedi

Re: [PHP] Stripslashes redundancy question.

2010-10-25 Thread Paul M Foster
On Sun, Oct 24, 2010 at 09:33:23PM -0400, Adam Richardson wrote: > This > was after many criticisms were leveled against the use of magic quotes: > http://en.wikipedia.org/wiki/Magic_quotes Wait-- according to this last l

RE: [PHP] Stripslashes redundancy question.

2010-10-25 Thread Bob McConnell
From: Adam Richardson > On Sun, Oct 24, 2010 at 6:29 PM, Gary wrote: >> In my form processing scripts, I usually have the variable set as so: >> >> $email = stripslashes($_POST['email']); >> >> I have discovered that the program that I use has a pre-written function of >> this: >> >> // remove es

[PHP] Looking for an open-source project

2010-10-25 Thread Mert Oztekin
Hi, I am looking for an open-source project to help and make some fun. Anyone has suggestions? Bu mesaj ve ekleri, mesajda g?nderildi?i belirtilen ki?i/ki?ilere ?zeldir ve gizlidir. Size yanl??l?kla ula?m??sa l?tfen g?nderen kisiyi bilgilendiriniz ve mesaj? si

Re: [PHP] Best practice for if (!$stmt->execute())

2010-10-25 Thread Rico Secada
On Mon, 25 Oct 2010 00:26:23 -0700 "Tommy Pham" wrote: > > -Original Message- > > From: Rico Secada [mailto:coolz...@it.dk] > > Sent: Sunday, October 24, 2010 9:06 PM > > To: php-general@lists.php.net > > Subject: [PHP] Best practice for if (!$stmt->execute()) > > > > Hi. > > > > I have

[PHP] Re: Interfacing with telnet using curl

2010-10-25 Thread HM 2K
Before I report this as a bug, can anyone provide an example of how to interface with a telnet server using curl? Here's what I've tried, with various results: $query) { $result=curl_telnet($query,$server)?'good':'fail'; echo "$server=$result\n"; } ?> This results as following: rainmaker

RE: [PHP] Best practice for if (!$stmt->execute())

2010-10-25 Thread Tommy Pham
> -Original Message- > From: Rico Secada [mailto:coolz...@it.dk] > Sent: Sunday, October 24, 2010 9:06 PM > To: php-general@lists.php.net > Subject: [PHP] Best practice for if (!$stmt->execute()) > > Hi. > > I have been doing like this: > > if (!$stmt->execute()) { > return false;