Assignment 4 You will be using the HTML form I’m linking to help you complete the following: The price of a standard computer is $800 which includes the selected operating system, Intel core i5, 8 GB...

1 answer below »
The assignment description is in the file(s) I'm linking. So use those as your guide on what exactly to do. This is a very short assignment since I'll be linking an already worked on html file.


Assignment 4 You will be using the HTML form I’m linking to help you complete the following: The price of a standard computer is $800 which includes the selected operating system, Intel core i5, 8 GB memory, and 1TB hard drive. Include the following options: Processor: Intel Core i5 (no extra charge), Intel Core i7 (add $300), AMD Ryzen (add $400) Memory: 8GB (no extra charge), 16 GB (add $100), 32GB (add $200), 64GB (add $400), 128GB (add $800) Hard Disk: 1TB (no extra charge), 2TB ( add $44.99), 4TB (add $109.99), 8TB (add $229.99), 10TB (add 279.99) Battery backup: add $69 Webcam: add $79 Wireless mouse: add $49.99 Headset: add $69 Presentation clicker: add $42.99 Customers are allowed to customize the system by adding optional items. When the customer selects "Finalize Sale" button, the form data should be sent to a PHP script. Sample form (Next page): Note: The cost of each optional component can be defined using the "value" attribute of the corresponding option of HTML elements in the html document. For example, you may use the following HTML structure for hard disk choices:

Note: selected="selected" attribute allows us to assign the default value. If you select 1TB as the hard disk size, then the browser will send the name/value pair hd=0 to the server using POST method. Hence, $_POST["hd"] is 0. If you select 2TB as the hard disk size, then the browser will send the name/value pair hd=44.99 to the server using POST method. Hence, $_POST["hd"] is 44.99. Your PHP script should calculate and display the total amount (add 5% sales tax). Requirements: Customer must select an operating system. Otherwise, display an appropriate error message and ask the customer to go back and select one. Name cannot be empty. Include the 'required' attribute to each text element (input type="text" ). If the name is empty, display an appropriate error message and ask the customer to go back and select one. Email cannot be empty. If the email is empty, display an appropriate error message and ask the customer to go back and select one. A sample output should be similar to the following: Note: You should use HTML tags to format the output. For example, HTML table structures is better for generating the output. Important: you must define appropriate form method and action. Note: Just like the text input boxes, use the corresponding key (name) to access form data sent to your PHP script. For example, if you define 'post' as the form method then use the variable $_POST['os'] to read the operating system value sent to the server, $_POST['memory'] to access the memory value. Save the PHP script as assignment4.php Submit the PHP code and HTML form as a zip file back to me. Hint As in the example, define appropriate associative arrays to store data for each component in your PHP script. For example, you may use an array similar to the following to store available operating systems: $ops = array("w10'=>'Windows 10', 'u12'=>'Ubuntu 17.4', ...); ( $ops['w10'] returns the value "Windows 10", ...) Similarly, you may define associative arrays to store cost of each component. Read the selected operating system into a variable: $selected_os = $_POST['os']; Then you can use the $selected_os variable to access the array and find the name of selected operating system : $ops[$selected_os] returns the value (name) of the selected operating system. By default, all the values are read into variables as string values. Use typecasting to read option values as numeric values. Assignment 2/stylSheet.css .submitButton { box-shadow:inset 0px -3px 7px 0px #29bbff; background:linear-gradient(to bottom, #2dabf9 5%, #0688fa 100%); background-color:#2dabf9; border-radius:3px; border:1px solid #0b0e07; display:inline-block; cursor:pointer; color:#ffffff; font-family:Arial; font-size:15px; padding:9px 23px; text-decoration:none; text-shadow:0px 1px 0px #263666; } .submitButton:hover { background:linear-gradient(to bottom, #0688fa 5%, #2dabf9 100%); background-color:#0688fa; } .submitButton:active { position:relative; top:1px; } .cancelButton { box-shadow:inset 0px 1px 0px 0px #cf866c; background:linear-gradient(to bottom, #d0451b 5%, #bc3315 100%); background-color:#d0451b; border-radius:3px; border:1px solid #942911; display:inline-block; cursor:pointer; color:#ffffff; font-family:Arial; font-size:13px; padding:6px 24px; text-decoration:none; text-shadow:0px 1px 0px #854629; } .cancelButton:hover { background:linear-gradient(to bottom, #bc3315 5%, #d0451b 100%); background-color:#bc3315; } .cancelButton:active { position:relative; top:1px; } Assignment 2/webpage.html Online Order Form 1. Operating System Empty Windows Linux 2. Processor Empty Intel Core i5 Intel Core i7 AMD Ryzen 3. Memory 8 GB   16 GB   32 GB   64 GB   128 GB 4. Accessories Battery backup   Webcam   Wireless mouse   Headset   Presentation clicker 5. Enter name 6. Enter email 7. Special instructions/Comments Submit   Cancel
Answered Same DaySep 21, 2021

Answer To: Assignment 4 You will be using the HTML form I’m linking to help you complete the following: The...

Anurag answered on Sep 22 2021
147 Votes
Assignment
Digital Store
Online Order Form


Configure your System

Operating System
-- select operating system --
Windows
Linux
Processor
-- select processor --
Intel Core i5
Intel Core i7
AMD Ryzen
Memory
128 GB
64 GB
32 GB
16 GB
...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here