In my form i have 13 input box in my form ,I allow user to type only text and number using following script
FILTER INPUT TEXT
$(function() {//<-- wrapped here
$('.restrict').on('input', function() {
this.value = this.value.replace(/[^a-zA-Z0-9@]/g, ''); //<-- replace all other than given set of values
});
});
Above script allows only text from a-z, number only
My question is i need to filter certain words in input box before saving it to database
Eg: if user enters *adult* content
in input box i need to filter the word adult
and save only content
to database
Can some one please help me
and can some one help me where do i find list of bad words