hey can any 1 tell me how i can validate a name field to allow only alphabets and spaces.i tried this
else if(ereg('[ ^ A-Za-z ]', $name))
{echo "<h5>YOU CAN ENTER ONLY ALPHABETS</h5>";
$errCnt++;
}
but this allows only alphabets.i cannot enter a space