Welcome Guest, Not a member yet? Register   Sign In
Display a set_message for each bad wor found in string
#2

(This post was last modified: 09-30-2016, 02:17 AM by RogerMore.)

Hey Wolfgang,

I can't help you with a solution for multiple messages.
What I can say is that your for loop is setting the message for 'badword' over and over again. So you probably get only one mesage with the last banned word in it.

Why not iterate through the matches and build a string with all the found bad words? Say $found_words becomes something like 'ban, bad'.
Then you can set a message like: 'You have used one or more banned words. You can't use $found_words. Sorry!'

Hope it helps!

-Roger
Reply


Messages In This Thread
RE: Display a set_message for each bad wor found in string - by RogerMore - 09-30-2016, 02:15 AM



Theme © iAndrew 2016 - Forum software by © MyBB