防止某些元素词在网站上提交[关闭]

I would like to know how I can prevent a word from being submitted in my database

lets say I want to prevent the word 'fast car' what type of code would I use to do that. the codes that im currently using are html, javascript, php. for my website.