#!/usr/bin/perl # Send Content-type. print "Content-type: text/html\n\n"; # Retrieve Web argument values. read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'}); @pairs = split(/&/, $buffer); foreach $pair (@pairs) { ($name, $value) = split(/=/, $pair); $value =~ tr/+/ /; $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; $value =~ s/~!/ ~!/g; $FORM{$name} = $value; } use DBI; # database information $db = "your database"; $host = "mysql.aero.und.edu"; $userid = "your userid"; $passwd = "your pwpwpwpw"; $connectionInfo = "dbi:mysql:$db;$host"; # make connection to database $dbh = DBI->connect( $connectionInfo, $userid, $passwd ); # prepare and execute query # ... # disconnect from database $dbh->disconnect