[thelist] a PHP function question - solved

Jay Blanchard jblanchard at pocket.com
Mon Feb 12 08:57:45 CST 2007

>> function censor ($data)
>>    {
>>     if (eregi('[gambl]', $data)) { $message = "inappropriate content
- submission denied"; $pass = "NO"; }
>>     return $data;
>>     echo "p: $pass<br>"; // this is just a test to see if the
variable is set - and it fails.
>>    }

Instead of returning $data you should probably return $pass. Returning
$data gives you the original word or phrase that was passed to the
function. Of course you can return $pass and $data if you'd like.

More information about the thelist mailing list