5.4. Basic exercises:

  1. Fill in the variables indicated ($database, $sql_statement, etc)

  2. Test your CGI script from the command line

  3. Try it from your browser (the URL will be something like http://training.netizen.com.au/~trainXX/cgi-bin/stocklist.cgi)

  4. If you haven't already, consider sorting your output

5.4.1. Advanced exercises:

  1. Convert the script to use fetchrow_hashref()

  2. Add a form to your output which allows the user to choose a sort order (use <SELECT> to create a drop-down menu), and which points back to the same script. If the sort order parameter is passed to the script, use it to change the sort order in your SQL statement and re-output the result, otherwise default to something sensible