Part I : Choose one of the following topics. (150 words is good)
1. What did you learn about the variable scope in PHP?
2. Use examples to show the differences between pre-increment and post-increment. (This topic is limited to 2 initial posts.)
3. Give a PHP code example of using one of the selection structures (if, switch, and conditional operator? (Each structure is limited to 2 initial posts.)
4. Give a PHP example of using one of the repetition structures (while, do-while, and for loops)? (Each structure is limited to 2 initial posts.)
5. How does PHP handle whitespace? Does the newline character '\n' work in PHP?
6. What procedures or components are important in the process of submitting user input with a web form and retrieving user input using PHP?
7. Open Question: Tell us something you learned in this module that impressed you?
Part II: see the attachmentBe sure to watch the web form video lecture and study code examples (order_form.html and order_process.php) when working on the assignment.
Jim's Deli Jim's Deli Make an order Apple: Banana: Microsoft Word - JL_BCS350_201_Module2_programming assignment (hw1).docx BCS 350: Web Database Development CRN 24518 JL Spring 2020 ----------------------------------------------------------------------------------------------------------------------------------------------------------------- Programming Assignment 1 ----------------------------------------------------------------------------------------------------------------------------------------------------------------- Objectives: Write PHP code to process data passed from HTML form; Write PHP statements to use PHP variables, perform mathematical operations, and use control structures to solve application problems; Use the echo construct and printf function to display output. Tasks: An Internet service provider has three different subscription packages for its customers: Internet Service Packages Package A: For $19.95 per month, 200 hours of access are provided. Additional hours are $0.40 per hour. Package B: For $29.95 per month, 300 hours of access are provided. Additional hours are $0.35 per hour. Package C: For $39.95 per month, unlimited access is provided. Write a web application that allows the customer to enter the letter of the package the customer has purchased (A, a, B, b, or C, c) and the number of hours that were used in a month, validates user input, calculates and displays the monthly charge in the browser. It also displays the amount of money the customer would save if a different package could be chosen. Watch the video lecture and study code example order_form.html and order_process.php. Create two files: hw1_form.html and hw1_process.php. The file hw1_form.html provides a HTML form for a user to enter the package name and the hours used. After the user submits the form, hw1_process.php processes the data as required. The specification of the assignment includes the following: 1) Display the Internet Service Packages information to the customer. 2) Display an HTML form that allows the customer to enter the letter of package and the number of hours used. Use 0 as a default value for the hours used. 3) After the form is submitted, display the customer’s input for the package name and hours used on a new webpage. 4) Assume we don’t use JavaScript to validate user input on the client side, the validation must be done on the server side in the hw1_process.php file. If the customer enters a letter other than lowercase or uppercase letter of A, B, and C, display “Wrong package entered. Please return to the previous page and enter a valid package name.” on the webpage. If the number of hours is negative, display “The number of hours must be non-negative. Please return to the previous page and enter a valid value.” on the webpage. 5) Calculate the customer’s monthly charge and display it on the webpage. The currency should be displayed with 2 decimal places as shown in the sample output. (Hints: Use the printf function.) 6) Display how much money the customer would save if he/she switches to other packages. If there would be no savings by switching to other packages, display “You chose the best package.”. 7) Wherever possible, use named constants instead of numbers, for example, package base cost, free hours for a package, and additional hour cost. 8) Use an HTML fieldset to display “BCS350 Assignment 1” followed by your name on the top of both web pages. Please see sample output below. You are free to decide the styles of your pages. Hints: Calculate costs for all three plans no matter which package the user uses. Save these costs for later cost comparison. Check your implementation using data in the sample output. Submission: 1. You should submit a ZIP file that includes two files named hw1_form.html and hw1_process.php on Blackboard by the due date. Do NOT use any other file names. 2. When you submit your work, in the submission comments area let me know if your program generates the same output as the four examples in the sample output. 3. Please include the integrity statement “I certify that this submission is my own original work” with your name and RAM ID as comments in all your source code files. Sample Output: 1. hw1_form.html page launched 2. Invalid value(s) (Package d and -60 minutes) processed 3. Valid values (Package A and 400 minutes) processed - example 1 4. Valid values (Package B and 400 minutes) processed – example 2 5. Valid values (Package B and 320 minutes) processed – example 3 6. Valid values (Package C and 250 minutes) processed – example 4 7. Valid values (Package B and 200 minutes) processed – example 5