0
Php signup form
I'm creating a signup form which the user must enter a desired display name, email and password. I wanna filter out the username for offensive words and special characters in between. can someone help me with the code. thanks 😊
2 odpowiedzi
+ 1
//strpos($input,"bad word");
// it will return value greater than -1 if bad word matches
$input = "hi I doesn't say bad words";
if(strpos($input,"bad words") > -1){
$error = true;
echo "Your name contains bad words, remove them";
}
0
@vishal thanks