Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

PHP Code Question Your task is to create a guestbook. The script has to be able to save the sent messages into the file guestbook.txt

PHP Code Question

Your task is to create a guestbook. The script has to be able to save the sent messages into the file guestbook.txt when the hidden mode parameter's value is save. Both the sent message and sender's name need to have potentially included HTML tags removed, as well as any empty characters at the beginning and end of the strings. If the "mode" parameter's value is something else than "save", output the contents of the guestbook as shown in the example output. Each line of the file contains a name and a message separated by the pipe character |. Thus the structure of guestbook.txt is as follows:

First sender|first message Second sender|second message ...

The form for sending the message looks like this:

Sender: Message:

image text in transcribed

Example output: Tina Tester: Hey! Sarah Scripter: Hi there! Cara Coder: Hi there, how goes? Pete Programmer: Yo, cool guestbook you have! Eric Example: Hello

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_2

Step: 3

blur-text-image_3

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

Structured Search For Big Data From Keywords To Key-objects

Authors: Mikhail Gilula

1st Edition

012804652X, 9780128046524

Students also viewed these Databases questions