In Hour 16, I didn’t write code to do anything with the order information the user entered after the checkout form was processed. In this hour, I’m inserting the order data into the database, so you can see how the back-end processing often works for online stores. As you’ve probably guessed, I had to make the same changes to this script that I had to make to the other scripts in order to get them to talk to the database. Before I look at the script’s new functionality, let’s look at the source code, which appears in Listing 20.5.
1: #!/usr/local/bin/perl 2: 3: use strict; 4: 5: use CGI; 6: use CGI::Carp qw(fatalsToBrowser); 7: use DBI; 8: 9: my $query = new CGI; 10: 11: my $database ...