Question: 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. <p dir="ltr">2. Add the following text and elements to the document body: </p> <p dir="ltr"><img alt="In this project, you will create a Web page that allows visitors" src="https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2024/09/66f3e2129d25a_15466f3e21227911.jpg"> </p> <p dir="ltr">3. Save the document as GuestBook.html. </p> <p dir="ltr">4. Create a new document in your text editor and type the declaration, element, document head, and </p>

element. Use Sign Guest Book as the content of the

element. <p dir="ltr">5. Add the following script section to the document body: </p> <p dir="ltr"><?php </p> </p><p dir="ltr">?> </p> <p dir="ltr">6. Add the following if statement to the script section to check whether the user filled in the first name and last name fields: </p> <p dir="ltr"><img src="https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2024/09/66f3e21349a16_15466f3e212c9a0e.jpg" alt="to your site to sign a guest book that is saved to"> </p> <p dir="ltr">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. </p> <p dir="ltr"><img src="https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2024/09/66f3e213e64bb_15566f3e21379e15.jpg" alt="a text file. Ensure that the Projects directory has read and write"> </p> <p dir="ltr">8. Save the document as SignGuestBook.php.</p> ! DOCTYPE html> html lang-"en"> head> <meta charset="UTP-8"> title>Guest Bookk/title> body> h2>Enter your name to sign our guest book form method-"POST" action-"SignGuestBook.php"> <p>First Name Kinput type-"text" name-"first name">X/p> </p><p last name name-> <pxinput type- value-></pxinput>X/p> <input type="text"> </p><p>Show Guest Book </p>

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!