RE: [PHP] Validating Email Conditional

2007-08-07 Thread Richard Lynch
; -Original Message- > From: Robin Vickery [mailto:[EMAIL PROTECTED] > Sent: Friday, August 03, 2007 12:59 AM > To: PHP General List > Cc: CK > Subject: Re: [PHP] Validating Email Conditional > > > On 02/08/07, CK <[EMAIL PROTECTED]> wrote: >> Hi >> >

Re: [PHP] Validating Email Conditional

2007-08-07 Thread Richard Lynch
You added or lost a parenthesis somewhere in there... if (getmxrr($domaintld,$mxrecords)) That part right there finishes off the "if (test)" part. Then you've got && starting off the statement where you are sort of supposed to be doing something more like $valid = true; or have { } On Wed, Augu

RE: [PHP] Validating Email Conditional

2007-08-03 Thread bruce
To: PHP General List Cc: CK Subject: Re: [PHP] Validating Email Conditional On 02/08/07, CK <[EMAIL PROTECTED]> wrote: > Hi > > Please see the notes below keeping in mind this RegEX is being used > to validate emails for a newsletter signup form. It may not be > possible, a

Re: [PHP] Validating Email Conditional

2007-08-03 Thread Robin Vickery
On 02/08/07, CK <[EMAIL PROTECTED]> wrote: > Hi > > Please see the notes below keeping in mind this RegEX is being used > to validate emails for a newsletter signup form. It may not be > possible, accommodating some of the formats you provided. If you have > the "Holy Grail" of RegEx please share.

Re: [PHP] Validating Email Conditional

2007-08-01 Thread Robin Vickery
On 02/08/07, CK <[EMAIL PROTECTED]> wrote: > Hi, > > Would you point out why? As I've tested a range of email address, > and have not found one rejected that is formatted correctly. ok, here's a few perfectly valid email addresses off the top of my head. The first one's especially annoying as I u

Re: [PHP] Validating Email Conditional

2007-08-01 Thread Davi
Em Quarta 01 Agosto 2007 19:56, Robin Vickery escreveu: > On 01/08/07, CK <[EMAIL PROTECTED]> wrote: > > Hi, > > > > My script is working, > > [...] > > > $regexp = "^([_a-z0-9-]+)(\.[_a-z0-9-]+)*@([a-z0-9-]+)(\.[a-z0-9-] > > +)*(\.[a-z]{2,4})$"; > > If your script is using that regular express

Re: [PHP] Validating Email Conditional

2007-08-01 Thread Robin Vickery
On 01/08/07, CK <[EMAIL PROTECTED]> wrote: > Hi, > > My script is working, [...] > $regexp = "^([_a-z0-9-]+)(\.[_a-z0-9-]+)*@([a-z0-9-]+)(\.[a-z0-9-] > +)*(\.[a-z]{2,4})$"; If your script is using that regular expression to validate email addresses then your script is most definitely not worki

Re: [PHP] Validating Email Conditional

2007-08-01 Thread Edward Kay
CK wrote: Hi, My script is working, but valid returns true even if the user is bogus. What needs changing so both conditions have to match, the following attempt returned "unexpected logical" if (getmxrr($domaintld,$mxrecords)) && if(fsockopen($domaintld,25,$errno,$errstr,30)) {

Re: [PHP] Validating Email Conditional

2007-08-01 Thread Jim Lucas
CK wrote: Hi, My script is working, but valid returns true even if the user is bogus. What needs changing so both conditions have to match, the following attempt returned "unexpected logical" if (getmxrr($domaintld,$mxrecords)) && if(fsockopen($domaintld,25,$errno,$errstr,30)) {