Your task:1. Convert cashier so that you can save data of customers’ order into a database2. Can display back the result3. Provide the sample program for modification (please change the server name and database)4. Create Balance of Quantity column(no need to update into database) Have to modify the given coding in 000webhost
Your task: 1. Convert cashier so that you can save data of customers’ order into a database 2. Can display back the result 3. Provide the sample program for modification (please change the server name
MENU.php
” ; print(“No Food_Name Price
“); while ($row_price = $Found->fetch_assoc()) { $dishes[]= $row_price[‘food_name’]; $price[]= $row_price[‘food_price’]; print($row_price[‘ID’] . ” ” . $row_price[‘food_name’] . ” ” . $row_price[‘food_price’] .”
” ); } } $connection->close(); // for ( $i = 0; $i < count( $dishes ); $i++ ) // print( "Element $i is $dishes[$i]
” ); ?>
INSERT.php close(); } //INSERT INTO `food_order` (`no`, `food_name`, `food_qty`) VALUES (‘1’, ‘Chicken Chop’, ‘3’); ?> CASHIER.js //var cc_price = parseFloat(document.frmCashier.cc_price.value); //var fnc_price = 3.50; //var tn_price = 1.50; //var sub = 0.0; function init() { var customer = prompt(“Please enter the customer’s name”); while (customer == “”){ customer = prompt(“Please enter the customer’s name”);} document.getElementById(‘username’).innerHTML = “Welcome ” + customer + ” to
” + “Secret recipe”; document.frmCashier.cc_qty.focus(); document.frmCashier.cc_qty.value = “”; document.frmCashier.fnc_qty.value = “”; document.frmCashier.tn_qty.value = “”; document.frmCashier.cc_sub_total.value = 0; document.frmCashier.fnc_sub_total.value = 0; document.frmCashier.tn_sub_total.value = 0; total(); function isAfloat(num) { var int_num; int_num = num – Math.floor(num); if (int_num != 0) return true; else return false; function cc() { var sub, qty; var cc_price = parseFloat(document.frmCashier.cc_price.value); qty = parseFloat(document.frmCashier.cc_qty.value); if (isNaN(qty) || qty < 0 || isAfloat(qty)){ document.frmCashier.cc_qty.value = ""; document.frmCashier.cc_sub_total.value = 0; document.frmCashier.cc_qty.focus(); } else { sub = cc_price * qty; document.frmCashier.cc_sub_total.value = sub.toFixed(2); total(); document.frmCashier.fnc_qty.focus(); document.frmCashier.fnc_qty.select(); } function fnc() { var sub, qty; var fnc_price = parseFloat(document.frmCashier.fnc_price.value); qty = parseFloat(document.frmCashier.fnc_qty.value); if (isNaN(qty) || qty < 0 || isAfloat(qty)) { document.frmCashier.fnc_qty.value = ""; document.frmCashier.fnc_sub_total.value = 0; document.frmCashier.fnc_qty.focus(); } else { sub = fnc_price * qty; document.frmCashier.fnc_sub_total.value = sub.toFixed(2); total(); document.frmCashier.tn_qty.focus(); } function tn() { var sub, qty; var tn_price = parseFloat(document.frmCashier.tn_price.value); qty = parseFloat(document.frmCashier.tn_qty.value); if (isNaN(qty) || qty < 0 || isAfloat(qty)){ document.frmCashier.tn_qty.value = ""; document.frmCashier.tn_qty.focus(); } else { sub =tn_price * qty; document.frmCashier.tn_sub_total.value = sub.toFixed(2); total(); document.frmCashier.reset.focus(); } function total() { var sub_cc, sub_fnc, sub_tn, grand_total; sub_cc = parseFloat(document.frmCashier.cc_sub_total.value); sub_fnc= parseFloat(document.frmCashier.fnc_sub_total.value); sub_tn = parseFloat(document.frmCashier.tn_sub_total.value); grand_total = sub_cc + sub_fnc + sub_tn; document.frmCashier.g_total.value = "RM " + grand_total.toFixed(2); PRINT.css body { font-family: courier; background-color: #FFFFFF; font-size: small; input[type="text"] { text-align:right; background-color: #FFFFFF; border: 0px; padding: 5px; .center { text-align: center; input[type="button"] { display:none; th { border-top: 1px dashed; STYLE.css body { font-size: x-large; caption { font-size:xx-large; input[type="text"] { font-size:x-large; text-align:right; color: red; background-color: #FFFFFF; border: 0px; padding: 5px; .center { text-align: center; table { background-color: #ADD8E6; border: thin solid #000000;
Why Choose Us
- 100% non-plagiarized Papers
- 24/7 /365 Service Available
- Affordable Prices
- Any Paper, Urgency, and Subject
- Will complete your papers in 6 hours
- On-time Delivery
- Money-back and Privacy guarantees
- Unlimited Amendments upon request
- Satisfaction guarantee
How it Works
- Click on the “Place Order” tab at the top menu or “Order Now” icon at the bottom and a new page will appear with an order form to be filled.
- Fill in your paper’s requirements in the "PAPER DETAILS" section.
- Fill in your paper’s academic level, deadline, and the required number of pages from the drop-down menus.
- Click “CREATE ACCOUNT & SIGN IN” to enter your registration details and get an account with us for record-keeping and then, click on “PROCEED TO CHECKOUT” at the bottom of the page.
- From there, the payment sections will show, follow the guided payment process and your order will be available for our writing team to work on it.