Code Clues

Pages

  • Home
  • About
  • Stay In Touch

Monday, 3 December 2012

Email validation in PHP


Email validation in php using regular expression.

$email = $_POST['email'];
if(preg_match("~([a-zA-Z0-9!#$%&'*+-/=?^_`{|}~])@([a-zA-Z0-9-]).([a-zA-Z0-9]{2,4})~",$email)) {
    echo 'This is a valid email.';
} else{
    echo 'This is an invalid email.';
}

Thank You!
Posted by Unknown at 06:09
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest
Labels: regular expression email validation php

No comments:

Post a Comment

Newer Post Older Post Home
Subscribe to: Post Comments (Atom)

Blog Archive

  • ►  2015 (3)
    • ►  June (3)
  • ►  2014 (6)
    • ►  July (4)
    • ►  February (2)
  • ▼  2012 (17)
    • ▼  December (9)
      • Creating Marker / Overlays in Google Map
      • Creating Google Maps using API
      • Creating RSS Feed in PHP
      • HTML to PDF Conversion in PHP
      • Unzipping a zipped file using PHP
      • Email validation in PHP
      • Payment through WorldPay
      • Image Upload in Different Sizes in PHP
      • Importing Excel Records to MySQL
    • ►  November (8)

Categories

  • 404 page using htaccess
  • angular js
  • Codeigniter
  • csv to mysql
  • Google map
  • html to pdf
  • image upload php
  • import excel to mysql
  • load data infile
  • pdf using php
  • regular expression email validation php
  • rss feed using php
  • seo
  • unzip document using php
  • Website quality guide
  • Website security
  • World pay
  • WorldPay payment code using php
glen-online.blogspot.in. Awesome Inc. theme. Powered by Blogger.