Re: [PHP] Checking for and @ and a .

2002-02-27 Thread Philip J. Newman
Yo thanks this dose work. (o; haven't got to functions in the book yet - Original Message - From: "Chris Burnett" <[EMAIL PROTECTED]> To: "Philip J. Newman" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Thursday, February 28, 2002 8:25 AM

Re: [PHP] Checking for and @ and a .

2002-02-27 Thread Chris Burnett
On 2/27/02 1:10 PM, "Philip J. Newman" <[EMAIL PROTECTED]> wrote: > I'm trying to make an email field and I would like to check that its valid > by checking for an @ and a . can someone point me in the right direction for > this. > > THanks > > > Philip J. Newman > Philip's Domain - Internet P

RE: [PHP] Checking for and @ and a .

2002-02-27 Thread James Hallam
Use a regular expression to test the variable submitted by the form. This is an excerpt from my usual validation script using ereg().. I'm sure you can adapt this for your purposes.. if (!ereg('^[-!#$%&\'*+\\./0-9=?A-Z^_`a-z{|}~]+'. '@'. '[-!#$%&\'*+\\/0-9=?A-Z