Ett stycke php-kod:
$charName = mysql_real_escape_string($_POST['charName']);
$accountName = mysql_real_escape_string($_POST['accountName']);
$password = mysql_real_escape_string($_POST['pass']);
if(!preg_match("/[^a-zA-Z]+$/", $charName))
{
die('Only names with A-Z works.');
}