>> PHP: Update Query
Web-Based Systems - Misbhauddin Pre-requisite Go Online Download file modify-item.php copy it to your root folder (D:\xampp\htdocs\Buy4mMe) Web-Based Systems - Misbhauddin
Fill in the Products – Select Query List all the items from the database into the empty space shown below in the same format. Column 1 is a radio button and Column 2 is the name of the item. Hence, the value of column-1 (radio button) should be equal to the “id” of the product. List of items from the DB (Like stuff.php)
Page-Page Communication modify-item.php update-item.php id of the selected item HOW? Recall the GET method How does it send values of the form to the PHP file Use that logic here too
Page-Page Communication modify-item.php update-item.php update-item.php?item=
Update Page: Retrieve current Info All information is filled from the database by executing a select query in the top with condition “where id = $_GET[‘item’].
Update Page: Execute update After the user changes the information and presses update Use the POST method to update the items by running the Update Query Display the message for success/failure selectively as we did earlier