As soon as a banned word is detected, it should not check for any more but immediately echo/print on screen/display a warning to the user with the first banned word spotted: Then, redirect to Google. Dump to database the banned word found, and the url of the page