Pg. 01 Question Two “Error*” “Question TwoQuestion Two

Pg. 01

Question Two<> “Error*” “Question TwoQuestion Two

4 Marks

Learning Outcome(s):

Build web applications using PHP.

Question One
1. Create an HTML form that accepts the following inputsfrom a user:

• Author Name

• Book Title

• Book status

• Book Description

2. Write a PHP file that displays the following:

• Author Name

• Book Title

• Book Description

Important Notes:

o You should onlyvalidate that all received dataarenot empty before processing them.

o The Book Title should be colored green if the user selects New for Book Status. Otherwise, it should be colored red.

3. Include the screenshot of the webpage output as a part of your answer.

 

 

 

 

4 Marks

Learning Outcome(s):

Build web applications using PHP.

Question Two
1. Giving the following HTML form code:

<!DOCTYPEhtml>

<html>

<head><title>Comment</title></head>

<body>

<h1>Your Comment:</h1>

<formaction=”commentProcess.php”method=”post”>

<labelfor=”username”>Username:</label>

<inputtype=”text”name=”username”id=”username”>

<br><br>

<labelfor=”comment”>Comment:</label>

<textareaname=”comment”id=”comment”cols=”30″rows=”10″></textarea><br><br>

<inputtype=”submit”value=”Send”>

</form>

</body>

</html>

Write a PHP file(commentProcess.php) that displays all input from a user and the total number of characters written in the comment.

Important Notes:

• You should validate that all received databefore processing them as follows:

o Data should not be empty.

o The number of charactersin the Commentshould be less than or equal to 100 words.

o You should display an appropriate error message for each violation.

2. Include the screenshot of the webpage output as a part of your answer.

 

 

 

 

 

Pg. 01 Question Two “Error*” “Question TwoQuestion Two

We offer the best custom writing paper services. We have answered this question before and we can also do it for you.

GET STARTED TODAY AND GET A 20% DISCOUNT coupon code DISC20

Leave a Comment