Answered You can hire a professional tutor to get the answer.

QUESTION

Write a web application which will list the number of items contained in the flea market inventory. (NOTE: The real purpose of this exercise is to...

Write a web application which will list the number of items contained in the flea market inventory. (NOTE: The real purpose of this exercise is to make use of a while loop.) The visitor to the page will identify the items by "inventory ID number" - that is, you should imagine that the organizers have assigned ID numbers to items - 1 for cleats, 2 for uniform pants, 3 for jerseys, etc. The visitor will enter the range of ID numbers desired, and the processing script will supply an inventory count for each number in the range.Create an input form, named solution05.html, which will ask for two numbers from the visitor - the start of the inventory ID range and the end.Within the script, define two constants - one to hold the lowest number assigned to the ID range by your organization, the other to hold the highest.NOTE: The idea here is that the organization may not wish to start number at 1.Read the numbers entered by the visitor and verify that they are sensible - the end of the range must be larger than the start, the starting number must be larger (or equal to) the lowest number in the ID range, and the ending number must be smaller than the highest ID assigned.Establish a while loop which will count from the start of the requested range to the end.Within the body of that loop, build a text string which will present the ID number and the inventory number, using a separate line (you can do this with a br tag) for each item.(NOTE: In a real application, we would supply something other than the ID number - we would display the item's description or something. That information should be read from a database . . . eventually we will learn how to accomplish that.)For now, you may assign a fixed value to the inventory number for each item - 8 items. Use a variable to hold that value, because in reality the value should be read from the database.In the HTML portion of the script file, which should be named solution05.php, display the result string.Extra Credit (5pts): Add code to your solution which will generate a random number for the number of items of each type. Use constants to set the limits for that random-number generation at 8 and 12.

Show more
LEARN MORE EFFECTIVELY AND GET BETTER GRADES!
Ask a Question