kvigor [EMAIL PROTECTED] schrieb im Newsbeitrag
news:[EMAIL PROTECTED]
Hello,
I 'm checking form data for profanity but it only works if the
$_POST['var'] is lowercase I was wondering if anyone knew how I could
catch the profanity no matter what case it was. No matter if it was BAD or
kvigor wrote:
Hello,
I 'm checking form data for profanity but it only works if the
$_POST['var'] is lowercase I was wondering if anyone knew how I could catch
the profanity no matter what case it was. No matter if it was BAD or bad or
mixed like BaD?
Instead of the long way:
if ($value
On 6/15/07, Chris [EMAIL PROTECTED] wrote:
kvigor [EMAIL PROTECTED] schrieb im Newsbeitrag
news:[EMAIL PROTECTED]
Hello,
I 'm checking form data for profanity but it only works if the
$_POST['var'] is lowercase I was wondering if anyone knew how I could
catch the profanity no matter what
I use something like this:
$_SESSION['profane'] = false;
foreach ($_POST as $value) {
foreach ($swearbox as $profanity) {
if (preg_match(/$profanity/i, $value)) {
$errors = true;
$_SESSION['profane'] = true;
mail(TECHEMAIL, 'profane content
Have you tried eregi()?
You don't need the regex functions, they're slow and you should be using
PCRE instead (IMO).
--
Richard Heyes
0844 801 1072
http://www.websupportsolutions.co.uk
Knowledge Base and HelpDesk software
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe,
2007. 06. 15, péntek keltezéssel 15.48-kor Dave Goodchild ezt írta:
I use something like this:
$_SESSION['profane'] = false;
foreach ($_POST as $value) {
foreach ($swearbox as $profanity) {
if (preg_match(/$profanity/i, $value)) {
$errors = true;
Man you have some issues... :p
Dave Goodchild wrote:
No, because extra processing is done on the other side - now
No, because extra processing is done on the other side - now
For ease of use, i would create a session and handle it that way or you
could pass it through $_GET[]
Query string.
Would recommend $_SESSION though.
Cheers
Sobajo [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Two forms (form1 and form2 submit to the same controller.php file. The
I agree. $_GET[] would expose the username and password on the URL.
For ease of use, i would create a session and handle it that way or you
could pass it through $_GET[]
Query string.
Would recommend $_SESSION though.
Cheers
Sobajo [EMAIL PROTECTED] wrote in message
news:[EMAIL
maybe the field is too small to hold the whole value?
some code might also help.
Gerard Samuel [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
Hey all. Another thought. In a form I have there is a drop down box
with age groups. ie 20-25 26-35 etc. If I
maybe your field is set to INT
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]
12 matches
Mail list logo