Solution:
slip14.html
<html>
<body>
<form name="form1" method="post" action="slip14.php">
Enter the EmailID *<input type="text" name="email"></input>
<input type="submit" value="submit"></input>
</form>
</body>
</html>
slip14.php
<?php
$email=$_POST['email'];
$regex = '/^[_a-z0-9-]+(\.[a-z0-9-]+)*@[a-z0-9]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$/';
if(preg_match($regex,$email)){
echo $email . "it is valid email id";
}
else
{
echo $email ."invalid email,Please try again.";
}
?>
0 Comments