email validation

Thread Solved

Join Date: Nov 2007
Posts: 183
Reputation: lydia21 is an unknown quantity at this point 
Solved Threads: 5
lydia21 lydia21 is offline Offline
Junior Poster

email validation

 
0
  #1
Nov 9th, 2007
hi,
how to validate email id in php...please send some code....lydia
Reply With Quote Quick reply to this message  
Join Date: Oct 2006
Posts: 2,902
Reputation: niek_e has a reputation beyond repute niek_e has a reputation beyond repute niek_e has a reputation beyond repute niek_e has a reputation beyond repute niek_e has a reputation beyond repute niek_e has a reputation beyond repute niek_e has a reputation beyond repute niek_e has a reputation beyond repute niek_e has a reputation beyond repute niek_e has a reputation beyond repute niek_e has a reputation beyond repute 
Solved Threads: 302
Moderator
Featured Poster
niek_e's Avatar
niek_e niek_e is online now Online
Cenosillicaphobiac

Re: email validation

 
0
  #2
Nov 9th, 2007
Originally Posted by lydia21 View Post
hi,
how to validate email id in php...please send some code....lydia
something like this perhaps:
  1. $email = "a@b.c";
  2.  
  3. if (stristr($email, "@") == false || stristr($email, ".") == false)
  4. {
  5. die("No valid email");
  6. }
  7. else
  8. {
  9. echo("email = valid");
  10. }
Didn't try it, but it might just work

Niek
Last edited by niek_e; Nov 9th, 2007 at 6:07 am.
Reply With Quote Quick reply to this message  
Join Date: Oct 2007
Posts: 147
Reputation: hopalongcassidy is an unknown quantity at this point 
Solved Threads: 13
hopalongcassidy's Avatar
hopalongcassidy hopalongcassidy is offline Offline
Junior Poster

Re: email validation

 
1
  #3
Nov 9th, 2007
You might want to check for a few more things. Please read the following:

http://ocliteracy.com/techtips/sql-injection.html

Hoppy
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the PHP Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC