All the Examples on this page can be found in the php sample site
Choosing the Pet to Delete
In this simple database example, if we want to delete a particular pet, we must first choose that pet. To Do this, we populate a pulldown box with all the pets currently in the database. For more on populating combination boxes, see the Combo Boxes Page.
Some PHP code required in order to retrieve the list of Pets for the combo box and to delete:
The form settings in pdelete.php calls pdelete2.php to actually remove the pet from the table:
Deleting the Pet
The pdelete2.php page is clean and simple. It contains only the code required to delete the pet and links.
The PHP code required to delete the pet:
next lesson - Combination (Pulldown) Boxes
|