I have a collection of string stored in database table separated by comma.
Table "not_allowed" content :
admin,administrator,register,email,password,username,database,computer,... etc. (as admin defind)
In user registration, I want that collection of string is "not allowed" as their username input.
How to make the validation in php in relation with database table content?
Manual scipt I have :
$notallowed = array('admin','administrator','register','email','password','username','database','computer',... etc);
if (in_array($username, $notallowed, true)) {
$errors[] = 'The Selected username is not allowed! ';
}