#!/usr/bin/perl -w ################################################# ## This is an Example of how to Connect to an ## Access Database using a DSN-less Connection ################################################# use POSIX; use strict; use CGI qw(:standard); use CGI::Carp qw(fatalsToBrowser); use DBI; ######################################### ## Create the Connection String ## To use a DSN just replace the string ## with the DSN name. ######################################### my $DSN = 'driver=Microsoft Access Driver (*.mdb);dbq=c:\\Inetpub\\domains\\rvnuccio.com\\doytest\\cgi-bin\\Clients.mdb'; my $dbh = DBI->connect("dbi:ODBC:$DSN", '','') or die "$DBI::errstr\n"; ############################### ## Generate SQL Statement ############################### my $sql = "Select 'John Smith' from TblOne"; # my $sql ="Select ClientName from Billing"; ############################### ## Prepare and execute the ## SQL Statement ############################### my $loadHandle = $dbh->prepare($sql); $loadHandle->execute|| die "Could not execute SQL statement ... maybe invalid?"; print header; print "SUBMITTED QUOTES\n"; print "

Submitted Quotes

\n"; print "
\n"; print "
\n"; print ""; print ""; print ""; print ""; print ""; print ""; print ""; print ""; print ""; print ""; print ""; print ""; print ""; ################################################################################################ my @row; while (@row=$loadHandle->fetchrow_array) { print ""; print ""; print ""; ################################ } print ""; print ""; print ""; print ""; print ""; print ""; print ""; print ""; print ""; print "
Name
@row
"; print " \;"; print " \;"; print "
\n"; print "\n\n"; ######################################### ## Close the connection when finished: ######################################### $dbh->disconnect; #!/usr/bin/perl #geturl.pl #Get header, ender, define the page title ## require "c:\\Inetpub\\domains\\rvnuccio.com\\doytest\\cgi-bin\\geturl.pl"; $Title = "Get Information from a url"; #Get the query string $QueryString = $ENV{'QUERY_STRING'}; #Use split to make an array of name-value pairs @NameValuePairs = split (/&/, $QueryString); # @NameValuePairs = $QueryString; # print @NameValuePairs #Put up an HTML header, page title and a rule print "Content-type: text/html\n\n"; print "\n"; print "

$Title

\n"; print "
\n"; #Split each of the name-value pairs and print them on the page foreach $NameValue (@NameValuePairs) { ($Name, $Value) = split(/=/, $NameValue, 2); print "Name = $Name, value = $Value
\n"; }