Issue with Quick Email validation

From: Date: Thu, 10 Mar 2011 09:44:30 +0000
Subject: Issue with Quick Email validation
Groups: php.general 
Request: Send a blank email to php-general+get-311759@lists.php.net to get a copy of this message
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@company.com 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?

« previous php.general (#311759) next »