No Content Found
Php - Validate Name
The code below shows a simple way to check if the name field only contains letters, dashes, apostrophes and whitespaces.
Only letters and white space allowed
preg_match("/^[a-zA-Z-' ]*$/","Your Name");
$name ='MD SAZZAD';
if (!preg_match("/^[a-zA-Z-' ]*$/",$name)) {
$nameErr = "Only letters and white space allowed";
}