#!/usr/bin/perl use DBI; use strict; use CGI qw(:standard); my $dbdatabase = "aacaffeine"; my $dbserver = "localhost"; my $dbuser = "root"; my $dbpassword = ""; my $username = cookie('username'); my $dbh = DBI->connect("DBI:mysql:$dbdatabase:$dbserver", $dbuser, $dbpassword); my $id = CGI::param('id'); my $query = "SELECT * FROM products WHERE productid = $id"; my $sth = $dbh->prepare($query); $sth->execute(); print "Content-type: text/html\n\n"; print "

\n"; my ($productname, $productdesc, $productprice, $productid); $sth->bind_columns(undef, \$productname, \$productdesc, \$productprice, \$productid); while ($sth->fetch()) { print "You are ordering: $productname for $productprice
"; } print "
"; print "\n"; print "\n"; print ""; print ""; print ""; print ""; print ""; print ""; print "\n"; print "\n"; print "\n"; #print "\n"; print ""; print "\n"; print "";
Name:
Password:
Street:
City:
State:
Zip:
Phone:
Email:
Payment method:VisaMasterCard
Card Number:
Expiration Date:Mo:Yr:
Exp. Month:
Exp. Year