Validate an E-Mail Address with PHP, complete script

Validate an E-Mail Address with PHPThis tutorial will teach you how to validate a e-mail id using regular expression to control email Spam. In this tutorial I used ternary operator to filter the values coming from the input box and avoid errors.

Complete Coding is here

function verify($email){
        return false;
    } else {
        return $email;
            echo $email." is a valid E-mail ID";
        } else {
            echo $email." is an invalid E-mail ID";
<form action="" method="post">
<input type="text" name="email" value="<?php echo $email;?>"/><br/>
<input type="submit" name="submit" value="validate" />

Labels: ,