Question: Certain words are not allowed on the website. When a user submits a review (using the User Review Form from Assignment 2), you need to
Certain words are not allowed on the website. When a user submits a review (using the User Review Form from Assignment 2), you need to check the review for the following words, and replace the words with generic characters (such as, !@#$%). The banned words are: stupid, idiotic, rubbish and horrible. Write a function that checks the submitted user review for these words, replaces them with a generic string, and outputs the censored user review to the browser.
This is my code for the Review Web Page.
Movie Review
if(isset($_GET["submit"]))
{ $name1=$_GET["name1"];
$r=$_GET["review"];
$re=$_GET["rating"];
$m=$_GET["movie1"];
echo "Movie name: ".$m." ";
echo "Username: ".$name1." ";
echo "Review: ".$r." ";
echo "Rating: ".$re. "Stars "." " ;
echo "Thank you for your feedback! " ;
}
?>
