I don't want a 100% solution, just the basics because I don't have time please , i will give like
Question 4 MOLPHIN Ayos la ORDERS le My Tehler anders Table IMP hem) prout WETU www Note: antered in a foreign kry to an customer ander Sample Dale Table customer wie Tome arder_ de date status M. 2011-11-04 00:00:00 Order Placed noor 22-11-04 00:00:00 Dec + Use the following connection.php by including it in your scripts, which connects you MySQL server and the database setAttribute(PDO::ATTR_ERRMODE, PDO ERRMODE EXCEPTION):) setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION):) Assume a user has logged in successfully and added many products of different quantities in his shopping basket. All this information is saved in Session Variables as follows: $_SESSION['activeUser'] holds the username S_SESSION[CART') holds an associative array whose key is the product id and its value is the quantity selected. 04-A: Write the required PHP statements to insert the customer order from the shopping basket into the two database tables. Your code must ensure that the order is completely inserted successfully or not. In addition, you must use prepared statement to insert the order items. Once inserted all your code should display the number of items inserted successfully in green color. Tesde - - 2, A,e, I g . pro Servey Question 14 Refer to Question 4 for Database Details 04-B: Write the required PHP statements to display all users orders in an HTML Table as follows: Username Order Date Time Number of Items Total Qty Order Status falqaed 2021-11-04 00:00:00 4 Order Placed noor 2021-11-04 00:00:00 2 3 Order Placed 4 Note that Number of Items is the number of different products in one order, while Total Qty is the sum of all quantities inside one order. Tip: use SQL Group By and built-in functions like count and sum Question 4 MOLPHIN Ayos la ORDERS le My Tehler anders Table IMP hem) prout WETU www Note: antered in a foreign kry to an customer ander Sample Dale Table customer wie Tome arder_ de date status M. 2011-11-04 00:00:00 Order Placed noor 22-11-04 00:00:00 Dec + Use the following connection.php by including it in your scripts, which connects you MySQL server and the database setAttribute(PDO::ATTR_ERRMODE, PDO ERRMODE EXCEPTION):) setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION):) Assume a user has logged in successfully and added many products of different quantities in his shopping basket. All this information is saved in Session Variables as follows: $_SESSION['activeUser'] holds the username S_SESSION[CART') holds an associative array whose key is the product id and its value is the quantity selected. 04-A: Write the required PHP statements to insert the customer order from the shopping basket into the two database tables. Your code must ensure that the order is completely inserted successfully or not. In addition, you must use prepared statement to insert the order items. Once inserted all your code should display the number of items inserted successfully in green color. Tesde - - 2, A,e, I g . pro Servey Question 14 Refer to Question 4 for Database Details 04-B: Write the required PHP statements to display all users orders in an HTML Table as follows: Username Order Date Time Number of Items Total Qty Order Status falqaed 2021-11-04 00:00:00 4 Order Placed noor 2021-11-04 00:00:00 2 3 Order Placed 4 Note that Number of Items is the number of different products in one order, while Total Qty is the sum of all quantities inside one order. Tip: use SQL Group By and built-in functions like count and sum