Affiliate Programs
 
Search affiliate programs for: 
Affiliate Categories
» Affiliate Networks
» Ad Networks
» 2 Tier Programs
» Pay Per Sale
» Pay Per Lead
» Residual Income
» Datafeeds
» Multi Tier Programs
» Business Opps
» Other Programs

Newsletter
Get newly added affiliate programs by email. Enter your email here:
Article Categories
» Affiliate Marketing
» Business
» Ecommerce
» Hosting
» Marketing
» Sales
» Web Designing
» Webmasters
» SEO & Promotion
» Working At Home
» Other Articles
» Affiliate Glossary


Go Back   AffiliateSeeking Forum > Website Creation, Design & Maintenance > Programming > PHP

PHP Discuss about your PHP scripting issues or help others with their PHP scripting problems.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 02-12-2010, 01:42 PM
webmyne webmyne is offline
Junior Member
 
Join Date: Feb 2010
Posts: 1
webmyne is on a distinguished road
Default Validate Email address with PHP

I have my website completely made in PHP. But I m stuck in the Email address validation. How can i do that with PHP

More Info
webmyne.com
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 07-16-2010, 10:54 AM
DaveSpencer DaveSpencer is offline
Super Moderator
 
Join Date: Mar 2010
Posts: 204
DaveSpencer is on a distinguished road
Have you had a look at this: http://www.codewalkers.com/c/a/Misce...tion-with-PHP/
__________________
150+ CPA Networks
Earn $0.30 to $1.20 CPM on Banner Ads - Earn even more via Popunders
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 11-12-2010, 11:51 AM
Pandadan Pandadan is offline
Member
 
Join Date: Nov 2010
Posts: 49
Pandadan is on a distinguished road
you must use regular expression and eregi function
something like that:

if (!eregi("^[a-z...]+@[a-z...]+\.[a-z...]), $email)

{
...
}
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 11-14-2010, 07:40 PM
iioacademy iioacademy is offline
Member
 
Join Date: Nov 2010
Posts: 32
iioacademy is on a distinguished road
It can either be validate thru js or php,
but I suggest javascript, for it is browser based, that means

1. the data is pass to your script after its validated.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 11-24-2010, 01:04 PM
MattCA MattCA is offline
Junior Member
 
Join Date: Nov 2010
Location: Rumia
Posts: 15
MattCA is on a distinguished road
Quote:
Originally Posted by iioacademy View Post
It can either be validate thru js or php,
but I suggest javascript, for it is browser based, that means
Never do "js or php" validation, you can do PHP or both. If user has JS disabled then all goes to the script without checking, which is bad.

eregi function suggested by Pandadan is deprecated.

PHP has built-in filter method to validate strings like emails and urls, which is filter_var(), so you could use:
PHP Code:
if ( !filter_var($mailVarFILTER_VALIDATE_EMAIL) ) {
    echo 
'Wrong e-mail address!';
} else {
    
emailIsCorrect();

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 04-11-2011, 02:08 PM
jenny3103 jenny3103 is offline
Member
 
Join Date: Apr 2011
Posts: 39
jenny3103 is on a distinguished road
In PHP we can do validation using ASP scripting language.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 04-22-2011, 03:54 AM
bizboy12 bizboy12 is offline
Junior Member
 
Join Date: Apr 2011
Posts: 2
bizboy12 is on a distinguished road
Check out the page http://www.phpkode.com/scripts/item/email-validator/

This PHP Script is used to check DNS records of valid email addresses. It matches it against a generic e-mail regular expression to see if the entered string has the format of an email address.

Hopefully can help you!

More free PHP validation scripts you can check out the page to search and free download the script you want.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 07-08-2011, 08:40 AM
nancysparx nancysparx is offline
Senior Member
 
Join Date: Jun 2011
Posts: 174
nancysparx is on a distinguished road
Thanks a lot for posting the coding part.I definitely use it in my work.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #9 (permalink)  
Old 07-13-2011, 01:54 PM
tylerlongtw tylerlongtw is offline
Senior Member
 
Join Date: May 2011
Posts: 392
tylerlongtw is on a distinguished road
a better option is to use javascript, so that you may not have to utilize the server resources, but any how the above provided expression by pandadan is correct
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 06:41 AM.


Powered by vBulletin® Version 3.6.7
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.0.0
© 2004-2011 AffiliateSeeking. All rights reserved.