Re: Issue with Quick Email validation

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

 



try != instead of ==, that should do the trick.

2011/3/10  <robert@xxxxxxxxxx>:
> 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?
>
>
>



[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