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 😊

28th Apr 2017, 1:53 PM
Mashan Shaluka1
Mashan Shaluka1 - avatar
2 Respostas
+ 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"; }
28th Apr 2017, 3:34 PM
Vishal Prajapati
0
@vishal thanks
28th Apr 2017, 4:10 PM
Mashan Shaluka1
Mashan Shaluka1 - avatar