Is there any way to allow characters such as "-" and "." (underscore and full-stop) in a username? Right now I'm using the ctype_alnum() function, but I don't know how to let the user use "." and "-".
if (ctype_alnum($uid) == false) {
$uidERR = "Only letters and numbers are allowed";
}