#!C:\Perl\bin\perl.exe use strict; use DBI; use CGI qw~:standard~; print "Content-type: text/html\n\n"; my ($DBH, $STH, @Address, $Contact); $Contact = param('Contact'); $DBH = DBI -> connect ('dbi:ODBC:SQLServer', ' ', ' ') or die "$DBI::errstr"; $STH = $DBH -> prepare (qq~select ContactAddress from dbo.ContactAddress where ID = '$Contact'~) or die "$DBI::errstr"; $STH -> execute or die "$DBI::errstr"; @Address = $STH -> fetchrow_array(); $DBH -> disconnect; print "$Contact"; print qq~