Presentation is loading. Please wait.

Presentation is loading. Please wait.

>> PHP: Update Query

Similar presentations


Presentation on theme: ">> PHP: Update Query"— Presentation transcript:

1 >> PHP: Update Query

2 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

3 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)

4 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

5 Page-Page Communication
modify-item.php update-item.php update-item.php?item=

6 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’].

7 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


Download ppt ">> PHP: Update Query"

Similar presentations


Ads by Google