Web Development Exercise 4-2
In this exercise, you will create an All-in-One form that is a work-_x000D_
ing “Contact Me” page. This page will have inputs for the subject,_x000D_
the sender’s name, the sender’s e-mail address, and the message. The_x000D_
form will also send a copy of the message to the sender._x000D_
_x000D_
1. Create a new document in your text editor. Type the_x000D_
!DOCTYPE declaration, element, header information,_x000D_
and element. Use the strict DTD and “Contact Me” as_x000D_
the content of the element._x000D_
_x000D_
2. Add the opening and closing tags for the PHP script section_x000D_
in the body of the document:_x000D_
<?php_x000D_
?>_x000D_
_x000D_
_x000D_3. Add a function called validateInput(). This function takes_x000D_
two parameters. The first parameter, $data, is a string to be_x000D_
validated. The second parameter, $fieldName, is the name_x000D_
of the form field. The function returns the $data parameter_x000D_
after it has been cleaned up. Notice that the function uses the_x000D_
global variable $errorCount._x000D_
225_x000D_
function validateInput($data, $fieldName) {_x000D_
global $errorCount;_x000D_
if (empty($data)) {_x000D_
echo ""$fieldName"" is a required field.n"";_x000D_"You need a similar assignment done from scratch? Our qualified writers will help you with a guaranteed AI-free & plagiarism-free A+ quality paper, Confidentiality, Timely delivery & Livechat/phone Support.
Discount Code: CIPD30
Click ORDER NOW..


