5.6. Deleting stock items

  1. The file cgi-bin/delstockform.cgi outputs the HTML for a form containing a drop-down list of stock items. You will need to edit it slightly to connect to your own database.

  2. Write a CGI script which accepts input from this form, and deletes the stock item specified. Output a message to the user indicating the success (or failure) of the operation. (An answer script is available as public_html/cgi-bin/delstock.cgi)

5.6.1. Advanced exercises

  1. Present a confirmation screen to the user, asking if they're sure they want to delete the item. You may wish to pass data in hidden HTML input fields, as shown in one of the practical exercises from the CGI Programming in Perl training module.