Thanks to both of you for your help. I greatly appreciate it.
Nog, I've implemented your suggestion in the following manner:
if(preg_match('/^[A-Za-z0-9\[\]_+ -]+$/', $_POST['sub_username'])){
$stop = '1';
$stop_reason = 'Username has illegal characters. (Only A-Z, 0-9, space, -, +, _, [ and ] are allowed.)';
include("./includes/overlord/page-users.php");
exit;
}
Which, if I understand it correctly, is stating that if the submitted string does not completely match the listed allowed ranges and characters, it will send the error. Testing looks like I've implemented it correctly, but I wanted to be sure.
For instance, testing+user works while testing!user does not.
Have I implemented the check properly?