[PHP] 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("Email invalid."); exit; } First Echo is just for me to check I type in a correct Email ID, say m...@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?
Re: [PHP] Issue with Quick Email validation
try != instead of ==, that should do the trick. 2011/3/10 : > 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("Email invalid."); > exit; > } > > First Echo is just for me to check > I type in a correct Email ID, say m...@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? > > >
Re: [PHP] Issue with Quick Email validation
Thank you, that did get me past that part! Had also to put in else statement to call Email function, without doing so the mail was sent even though giving error Robert -Original Message- From: Louis Huppenbauer To: rob...@myself.com Cc: php-general@lists.php.net Sent: Thu, Mar 10, 2011 11:38 am Subject: Re: [PHP] Issue with Quick Email validation try != instead of ==, that should do the trick. 2011/3/10 : > 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("Email invalid."); >exit; >} > > First Echo is just for me to check > I type in a correct Email ID, say m...@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? > > >
Re: [PHP] Issue with Quick Email validation
On 10 March 2011 11:07, wrote: > Thank you, that did get me past that part! > > Had also to put in else statement to call Email function, without doing so > the mail was sent even though giving error > > Robert > > > > > > > > -Original Message- > From: Louis Huppenbauer > To: rob...@myself.com > Cc: php-general@lists.php.net > Sent: Thu, Mar 10, 2011 11:38 am > Subject: Re: [PHP] Issue with Quick Email validation > > > try != instead of ==, that should do the trick. > > > > 2011/3/10 : > >> 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("Email invalid."); > >> exit; > >> } > >> > >> First Echo is just for me to check > >> I type in a correct Email ID, say m...@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? Why bother asking for the entire address? Just ask for the name part and display the domain name on the form? Enter your email address: @company.com sort of thing. -- Richard Quadling Twitter : EE : Zend @RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Issue with Quick Email validation
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.f...@leedsmet.ac.uk Tel: +44 113 812 4730 > -Original Message- > From: rob...@myself.com [mailto:rob...@myself.com] > Sent: 10 March 2011 09:45 > To: php-general@lists.php.net > Subject: [PHP] 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("Email > invalid."); > exit; > } > > First Echo is just for me to check > I type in a correct Email ID, say m...@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? > 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
[PHP] PHP 5.3.6RC2 Released for Testing
The third, and last, release candidates of 5.3.6 was just released for testing and can be downloaded here: http://downloads.php.net/johannes/php-5.3.6RC3.tar.bz2 (md5sum: 0098109e00a0514f947e4358d1381a67) http://downloads.php.net/johannes/php-5.3.6RC3.tar.gz (md5sum: e4d756d89d89844b1da49c1ad41e0aac) The windows binaries are available at: http://windows.php.net/qa/ Windows users please mind that we don't provide VS6 builds anymore. This is a step in the release process of this versions and goal is having a final version using the same source state by next week,. targeting at March 17th for the release. This RC fixes errors in the shmop and SPL extensions as well as updating the timezone database. To ensure that the release is solid, please test this RC against your code base and report any problems that you encounter. Johannes Schlüter PHP 5.3 Release Master -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP 5.3.6RC2 Released for Testing
What will be the changes in PHP 5.3.6 final? 2011/3/10 Johannes Schlüter > The third, and last, release candidates of 5.3.6 was just released for > testing and can be downloaded here: > > http://downloads.php.net/johannes/php-5.3.6RC3.tar.bz2 (md5sum: > 0098109e00a0514f947e4358d1381a67) > http://downloads.php.net/johannes/php-5.3.6RC3.tar.gz (md5sum: > e4d756d89d89844b1da49c1ad41e0aac) > > The windows binaries are available at: http://windows.php.net/qa/ > Windows users please mind that we don't provide VS6 builds anymore. > > This is a step in the release process of this versions and goal > is having a final version using the same source state by next week,. > targeting at March 17th for the release. This RC fixes errors in the > shmop and SPL extensions as well as updating the timezone database. To > ensure that the release is solid, please test this RC against your code > base and report any problems that you encounter. > > Johannes Schlüter > PHP 5.3 Release Master > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- sexyprout
Re: [PHP] PHP 5.3.6RC2 Released for Testing
http://svn.php.net/viewvc/php/php-src/tags/php_5_3_6RC3/NEWS?revision=309052&view=markup 2011/3/10 sexyprout : > What will be the changes in PHP 5.3.6 final? > > 2011/3/10 Johannes Schlüter > >> The third, and last, release candidates of 5.3.6 was just released for >> testing and can be downloaded here: >> >> http://downloads.php.net/johannes/php-5.3.6RC3.tar.bz2 (md5sum: >> 0098109e00a0514f947e4358d1381a67) >> http://downloads.php.net/johannes/php-5.3.6RC3.tar.gz (md5sum: >> e4d756d89d89844b1da49c1ad41e0aac) >> >> The windows binaries are available at: http://windows.php.net/qa/ >> Windows users please mind that we don't provide VS6 builds anymore. >> >> This is a step in the release process of this versions and goal >> is having a final version using the same source state by next week,. >> targeting at March 17th for the release. This RC fixes errors in the >> shmop and SPL extensions as well as updating the timezone database. To >> ensure that the release is solid, please test this RC against your code >> base and report any problems that you encounter. >> >> Johannes Schlüter >> PHP 5.3 Release Master >> >> >> >> -- >> PHP General Mailing List (http://www.php.net/) >> To unsubscribe, visit: http://www.php.net/unsub.php >> >> > > > -- > sexyprout > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: [PHP-DEV] Re: [PHP] PHP 5.3.6RC2 Released for Testing
2011/3/10 sexyprout : > What will be the changes in PHP 5.3.6 final? No change between RC3 and final if everything is fine in this RC, if not then we may need another RC. Cheers, -- Pierre @pierrejoye | http://blog.thepimp.net | http://www.libgd.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP 5.3.6RC2 Released for Testing
On Thu, 10 Mar 2011 17:11:42 +0100, sexyprout wrote: > What will be the changes in PHP 5.3.6 final? >From the message you quoted: > 2011/3/10 Johannes Schlüter >> This is a step in the release process of this versions and goal >> is having a final version using the same source state by next week johannes -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP 5.3.6RC2 Released for Testing
Sorry everyone. I actually meant "the full changelog from v5.3.5 to v5.3.6." -- sexyprout
[PHP] Re: [PHP-DEV] Re: [PHP] PHP 5.3.6RC2 Released for Testing
See the NEWS file in the release. 2011/3/10 sexyprout : > Sorry everyone. I actually meant "the full changelog from v5.3.5 to v5.3.6." > > -- > sexyprout > -- Pierre @pierrejoye | http://blog.thepimp.net | http://www.libgd.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: [PHP-DEV] Re: [PHP] PHP 5.3.6RC2 Released for Testing
maybe the title "PHP 5.3.6RC2 Released for Testing" is wrong,please check. Best regards, Sharl.Jimh.Tsin (From China **Obviously Taiwan INCLUDED**) 2011/3/11 Pierre Joye : > See the NEWS file in the release. > > 2011/3/10 sexyprout : >> Sorry everyone. I actually meant "the full changelog from v5.3.5 to v5.3.6." >> >> -- >> sexyprout >> > > > > -- > Pierre > > @pierrejoye | http://blog.thepimp.net | http://www.libgd.org > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php