Jump to content

How would I do this?


marcus

Recommended Posts

I stated that wrong.

How would I be able to create a document that checks if the user submitted a word that was in an array. If they did submit a word it would come up with a message saying like "blah blah blah bad word." And if no word from the array was found it would complete the task.

Something like:

[code]
<?php
$mesg = $_POST[message];
$array = array("words,that,the,user,cannot,submit");

if($mesg == $array){
echo "bad word";
}else {
echo "fine statement";
};
?>
[/code]

something like that, but how would I make it to check if $mesg included any of the words in $array
Link to comment
https://forums.phpfreaks.com/topic/28291-how-would-i-do-this/#findComment-129385
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.