RE: Issue with Quick Email validation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Apart form the obvious error already solved, in this situation I would not be forcing my users to type in an element that only has one option -- I would display the form box with the text "@company.com" immediately after it, and only expect the unique part to be entered.

Cheers!

Mike

 -- 
Mike Ford,
Electronic Information Developer, Libraries and Learning Innovation,  
Leeds Metropolitan University, C507 City Campus, 
Woodhouse Lane, LEEDS,  LS1 3HE,  United Kingdom 
Email: m.ford@xxxxxxxxxxxxxx 
Tel: +44 113 812 4730



> -----Original Message-----
> From: robert@xxxxxxxxxx [mailto:robert@xxxxxxxxxx]
> Sent: 10 March 2011 09:45
> To: php-general@xxxxxxxxxxxxx
> Subject:  Issue with Quick Email validation
> 
> Hi,
> I'm newbie to PHP and this list, possible not a new question so
> forgive me if it's a repeat
> I have a form where I want the submitter Email ID to only be from
> one domain
> 
> Here's the part I'm having issues with
> 
>                                         $domain = explode( "@",
> $who);
>                         if ( $domain[1] == "company.com") {
>                                         echo $domain[1];
>                                         echo("<h3>Email
> invalid.</h3>");
>                                         exit;
>                                         }
> 
> First Echo is just for me to check
> I type in a correct Email ID, say me@xxxxxxxxxxx
> 
> The return of this is:
> 
> company.com
> Email invalid.
> 
> 
> As far as I can see this if statement should not fall in, what am I
> missing?
> 



To view the terms under which this email is distributed, please go to http://disclaimer.leedsmet.ac.uk/email.htm

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux