943,902 Members | Top Members by Rank

Ad:
  • PHP Discussion Thread
  • Marked Solved
  • Views: 2370
  • PHP RSS
Nov 9th, 2007
0

email validation

Expand Post »
hi,
how to validate email id in php...please send some code....lydia
Similar Threads
Reputation Points: 19
Solved Threads: 5
Junior Poster
lydia21 is offline Offline
183 posts
since Nov 2007
Nov 9th, 2007
0

Re: email validation

Click to Expand / Collapse  Quote originally posted by lydia21 ...
hi,
how to validate email id in php...please send some code....lydia
something like this perhaps:
php Syntax (Toggle Plain Text)
  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 Nick Evan; Nov 9th, 2007 at 6:07 am.
Moderator
Featured Poster
Reputation Points: 4142
Solved Threads: 394
Industrious Poster
Nick Evan is offline Offline
4,132 posts
since Oct 2006
Nov 9th, 2007
1

Re: email validation

You might want to check for a few more things. Please read the following:

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

Hoppy
Reputation Points: 53
Solved Threads: 13
Junior Poster
hopalongcassidy is offline Offline
148 posts
since Oct 2007

This thread is solved

Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in PHP Forum Timeline: A little help please
Next Thread in PHP Forum Timeline: PHP Parse Error





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC