Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

how to validate phone number in php procedural programming

<?php
$reg = '/^[_a-z0-9-]+(.[_a-z0-9-]+)*@[a-z0-9-]+(.[a-z0-9-]+)*(.[a-z]{2,3})$/';
if (preg_match($reg, $email)) {
echo $email . " Email Id is accepted.";
} else {
echo $email . "Invalid Email ID.";
}
?>
Source by blog.udemy.com #
 
PREVIOUS NEXT
Tagged: #validate #phone #number #php #procedural #programming
ADD COMMENT
Topic
Name
2+9 =