Question
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:
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
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started