Justtechjobs.com Find a programming school near you






Online Campus Both


php-general | 2001062

Fw: [PHP] problems with round .. From: Gyozo Papp (pgerzson <email protected>)
Date: 06/30/01

----- Original Message -----
From: "Clayton Dukes" <cdukes <email protected>>
To: "Gyozo Papp" <pgerzson <email protected>>; "Chad Day" <cday <email protected>>
Sent: 2001. június 29. 20:50
Subject: Re: [PHP] problems with round ..

> Hey,
> Could one of you do me a favor and post this to the list, it doesn't seem to
> be posting my messages....
>
>
> Thanks!
>
> Clayton Dukes
> CCNA, CCDA, CCDP, CCNP
> Download Free Essays, Term Papers and Cisco Training from http://www.gdd.net
>
> ----- Original Message -----
> From: "Clayton Dukes" <cdukes <email protected>>
> To: "Clayton Dukes" <cdukes <email protected>>; <php-general <email protected>>
> Sent: Friday, June 29, 2001 9:43 AM
> Subject: Re: Regular Expression help
>
>
> > Okay, here's what I have so far:
> >
> > ---snip---
> > if ((!$email)
> > || ($email=="")
> > || (!eregi("^[_\.0-9a-z-]+ <email protected>+[a-z]",$email))
> > )
> > $stop = "<center>"._ERRORINVEMAIL."</center><br>";
> > ---snip---
> >
> > This works, but how can I add a second domain?
> > ie:
> >
> > ---snip---
> > if ((!$email)
> > || ($email=="")
> > || (!eregi("^[_\.0-9a-z-]+ <email protected>+[a-z]",$email))
> > || (!eregi("^[_\.0-9a-z-]+ <email protected>+[a-z]",$email))
> > )
> > $stop = "<center>"._ERRORINVEMAIL."</center><br>";
> > ---snip---
> >
> > This doesn't work. (it returns the error no matter what I enter)
> >
> > Thanks guys (and gals?)
> >
> > Clayton Dukes
> > CCNA, CCDA, CCDP, CCNP
> > Download Free Essays, Term Papers and Cisco Training from
> http://www.gdd.net
> >
> >
> > ----- Original Message -----
> > From: "Clayton Dukes" <cdukes <email protected>>
> > To: <php-general <email protected>>
> > Sent: Friday, June 29, 2001 9:08 AM
> > Subject: Regular Expression help
> >
> >
> > > Hi everyone,
> > >
> > > I have a new user function that checks e-mail addresses.
> > > I wish to only allow people from two different domains to register.
> > > How can I filter out all other e-mail addresses and return an error if
> > it's
> > > not from those domains.
> > >
> > > Here's what I have:
> > >
> > > if ((!$email) || ($email=="") ||
> > > (!eregi("^[_\.0-9a-z-]+@([0-9a-z][0-9a-z-]+\.)+[a-z]{2,3}$",$email)))
> > $stop
> > > = "<center>"._ERRORINVEMAIL."</center><br>";
> > >
> > > What this currently does is just makes sure it's a valid e-mail address.
> > > What I'd like it to do is if the user enters anything except
>  <email protected>
> > or
> > >  <email protected> it spits out the error (ERRORINVEMAIL)
> > >
> > > So (I think) It would look something like this:
> > >
> > > if ((!$email) || ($email=="") ||
> (!eregi("^[_\.0-9a-z-]+@([DdOoMmAaIiNn1]
> > ||
> > > (or statement???) [DdOoMmAaIiNn2-]+\.)+[a-z]{2,3}$",$email))) $stop =
> > > "<center>"._ERRORINVEMAIL."</center><br>";
> > >
> > >
> > > Of course, this doesn't work, but you get the point.
> > >
> > >
> > > Thanks!
> > > P.S.
> > > Thanks for the Awesome List!
> > >
> > > Clayton Dukes
> > > CCNA, CCDA, CCDP, CCNP
> > > Download Free Essays, Term Papers and Cisco Training from
> > http://www.gdd.net
> > >
> > >
> > >
> > >
>

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-general-unsubscribe <email protected>
For additional commands, e-mail: php-general-help <email protected>
To contact the list administrators, e-mail: php-list-admin <email protected>