Write the PHP script called remove.php and create an HTML form for your web page that removes lines of text from a given file, the file contains sentences and it is called text.txt. Your we page contains a short form with a text box and text field where the customers or users can type only one word. Then the web page should provide the following behaviors: • The web page displays the current contents of the file text.txt as it appear in the file with its format. • The web page form submits back to the same page, remove.php, as a post request. • Enter one word in the text box and when the word is submitted, your code should search the contents of text.txt to find the matching word and remove any lines from the file that contain the given word. • Assume that this is not case sensitive. • Display changes of the file to any future viewings of the web page. • Use the browser's default styling or may need to write any suitable CSS style. • Match the exact word, not other words that contain it as a substring, for example when the word “to” is searched, you should remove lines containing the word “to”, instead of the lines that contain a word such as “tool” or “took". Text.txt file should contain the following sentences: • I am one in millions • I would like to be a developer • Lockdown was not a good idea • Most people have one thing in common • I would like to travel

Microsoft Visual C#
7th Edition
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Joyce, Farrell.
Chapter13: Handling Events
Section: Chapter Questions
Problem 2E
icon
Related questions
Question

Write the PHP script called remove.php and create an HTML form for your web page that
removes lines of text from a given file, the file contains sentences and it is called text.txt. Your
we page contains a short form with a text box and text field where the customers or users can
type only one word. Then the web page should provide the following behaviors:
• The web page displays the current contents of the file text.txt as it appear in the file
with its format.
• The web page form submits back to the same page, remove.php, as a post request.

• Enter one word in the text box and when the word is submitted, your code should
search the contents of text.txt to find the matching word and remove any lines from the
file that contain the given word.
• Assume that this is not case sensitive.
• Display changes of the file to any future viewings of the web page.
• Use the browser's default styling or may need to write any suitable CSS style.
• Match the exact word, not other words that contain it as a substring, for example when
the word “to” is searched, you should remove lines containing the word “to”, instead of
the lines that contain a word such as “tool” or “took".
Text.txt file should contain the following sentences:
• I am one in millions
• I would like to be a developer
• Lockdown was not a good idea
• Most people have one thing in common
• I would like to travel

Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Image Element
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,