Hi there everyone,
Is there a better way I can do this?
if ($email == "[EMAIL PROTECTED]" OR $subject == "Rulez666"
Basically, if I have data coming from a form to a DB, is there a better way
to say check EVERY variable for a specific set of words rather than doing
$name, $subject etc .... seperately?
The reason I ask is my scripts are being exploited and I can fix it when the
attacks happen, but i'd like to be able to have a string which checks all
the form data and takes action if a word I define in a list exists.
So, instead of doing if ($name == " mememe " ...... if($email == "
[EMAIL PROTECTED] " ....... I could just have a simple statement with a
group of words, and if one of the words appears it takes an action I specify
such as do not proceed to add to DB etc ....
Any help would be greatly appreciated as I am tired of keep writing the same
scripts with different variables, i'd love to just grab all the variables
from the form and perform the action ONCE on the incoming form data and then
all the variables are affected instead of doing each one.
Please save me from going nuts :-)