Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In this project, you will create a Web page that allows visitors to your site to sign a guest book that is saved to a

In this project, you will create a Web page that allows visitors to your site to sign a guest book that is saved to a text file. Ensure that the Projects directory has read and write permissions for everyone.

1. Create a new document in your text editor and type the declaration,

element, document head, and

element. Use Guest Book as the content of the

element.

2. Add the following text and elements to the document body:

image text in transcribed

3. Save the document as GuestBook.html.

4. Create a new document in your text editor and type the declaration,

element, document head, andelement. Use Sign Guest Book as the content of theelement.

5. Add the following script section to the document body:

?>

6. Add the following if statement to the script section to check whether the user filled in the first name and last name fields:

image text in transcribed

7. Add the following else clause to the end of the script section. The statements in the else clause use the fwrite() function to add visitor names to a text file named guestbook.txt.

image text in transcribed

8. Save the document as SignGuestBook.php.

9. Create a document named ShowGuestBook.php that displays the names of visitors who have signed the guest book. Use the readfile() function to display the contents of the guestbook.txt file. Note that you will need to use the

 element (Links to an external site.)Links to an external site. for Web browsers to recognize the line breaks. 

10. Open GuestBook.html in your Web browser by entering the following URL: http:///GuestBook.html. Test the form to see if you can write data to and read data from the guestbook.txt file.

Here is the link: https://www.w3schools.com/tags/tag_pre.asp

! DOCTYPE html> html lang-"en"> ?head> title>Guest Bookk/title> body> h2>Enter your name to sign our guest book ?form method-"POST" action-"SignGuestBook.php">

First Name Kinput type-"text" name-"first name">X/p>

X/p>

Show Guest Book

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

Step: 3

blur-text-image

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

Fundamentals Of Database Systems

Authors: Ramez Elmasri, Shamkant B. Navathe

7th Edition Global Edition

1292097612, 978-1292097619

More Books

Students also viewed these Databases questions

Question

7. It is advisable to do favors for people whenever possible.

Answered: 1 week ago

Question

9. Power and politics can be destructive forces in organizations.

Answered: 1 week ago