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.

Reviewing Page


Movie Review


Username:

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! " ;

}

?>

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!