Topic: How to forbid certain characters from being in subject title & body?

I get spammed a lot with a ? character, and want it to not allow posting if that character is in either the subject title, or body

TIA

Re: How to forbid certain characters from being in subject title & body?

bump

Re: How to forbid certain characters from being in subject title & body?

i(strpos($message, "?"))
message('You can't use this character');

Put this somewhere where it's useful.

4 (edited by Smartys 2006-06-08 10:09)

Re: How to forbid certain characters from being in subject title & body?

I don't think that would work, because strpos can return both 0 (the character(s) is/are at the 0th position) or false.
You would want

if (strpos($message, "?") !== false)
message('You can't use this character');

Otherwise, by putting it at the beginning of the string the check could be circumvented I believe