Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Rewrite the print statement in the final version of handle_post.php (Script 5.7) so that it uses single quotation marks and concatenation instead of double quotation

Rewrite the print statement in the final version of handle_post.php (Script 5.7) so that it uses single quotation marks and concatenation instead of double quotation marks.

Files attached below:

handle_post.php

Forum Posting

// Address error management, if you want.

// Get the values from the $_POST array. // Strip away extra spaces using trim(): $first_name = trim($_POST['first_name']); $last_name = trim($_POST['last_name']); $posting = trim($_POST['posting']);

// Create a full name variable: $name = $first_name . ' ' . $last_name;

// Get a word count: $words = str_word_count($posting);

// Take out the bad words: $posting = str_ireplace('badword', 'XXXXX', $posting);

// Print a message: print "

Thank you, $name, for your posting:

$posting

($words words)

";

?>

posting.html

Forum Posting

Please complete this form to submit your posting:

First Name:

Last Name:

Email Address:

Posting:

thanks.php

Thanks!

// Address error management, if you want.

// Get the values from the $_GET array: $name = $_GET['name']; $email = $_GET['email'];

// Print a message: print "

Thank you, $name. We will contact you at $email.

";

?>

Your modifications to the handle_post.php file should give an output like this:

image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Professional Microsoft SQL Server 2012 Administration

Authors: Adam Jorgensen, Steven Wort

1st Edition

1118106881, 9781118106884

More Books

Students also viewed these Databases questions