Starting a new series about code Snippets, In this series we share some useful code snippets of HTML, HTML5, CSS, CSS3, PHP, Javascript and jQuery snippets. We hope that these snippets will worthwhile for our readers and should help in your projects.

Today we share a PHP Code Snippets “Check valid email address”.

    $email = $_POST&#91;'email'&#93;;
    if(filter_var($email, FILTER_VALIDATE_EMAIL)){
        echo '<p>This is a valid email.<p>';
        echo '<p>This is an invalid email.</p>';

<form action="" method="post">
    Email: <input type="text" name="email" value=" <?php echo $_POST&#91;'email'&#93;; ?> ">
    <input type="submit" value="Check Email">