Think about the logic behind adding a new product.
Step 1. Build a form that will capture the information you are looking for. Make sure to add validation on the items you require.
Step 2. POST the information from the form to a “function” php page that “inserts” the data into the database.
Think about the logic behind updating information from a database.
Step 1. Build a form to hold the information.
Step 2. Load the form with the information from the database table.
Step 3. When the person makes the changes, the changes are POSTed to the form on the “function” page that “updates” the data in the database.