Question: How do I set a cookie that retrieves an 'id' from a database I have created with php. I have created the below code but
How do I set a cookie that retrieves an 'id' from a database I have created with php. I have created the below code but it doesn't work. I need the result to be like this picture

Door Lever Inventory - Part 2
Please set product details"; } else { echo "Product successfully added to the database
"; echo "The product ID for this product is ".$_COOKIE['ID']."
"; } ?> Task 2 - Add a cookie to keep track of the Product ID 1. Include a cookie to store the id field when the product data has been added to the database. Process Product Details x C localhost/4PHP/DoorLeverInventoryAssignment/DoorLeverAssign_Part 2/php/processProdDetails.php Door Lever Inventory - Part 2 Products Product details successfully added to the database. The product ID for this product is 3 2. Retrieve this cookie and display the id to the user after the message has been displayed to inform the user the product details have been successfully added. 3. Document your code and explain where your cookies have been set and retrieved. X
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
