Hello FJH,
There is actually two small perl scripts. The code for them is below. The first Perl script which I named extractor2.pl contains the following
$temp=$ENV{'QUERY_STRING'};
@pairs=split(/&/,$temp);
foreach $item(@pairs)
{
($key,$content)=split (/=/,$item,2);
$content=~tr/+/ /;
$content=~ s/%(..)/pack("c",hex($1))/ge;
$fields{$key}=$content;
};
$LastName=$fields{'MyField'};
print "Content-type: text/html\n\n";
print "<FONT SIZE=6><p>The value you submitted was: <b>$LastName</b><br>";
print "Below you will find the results that have been returned from the database</p></FONT>";
system("G:\\Sesame\\Program\\extractor vagrant G:\\Sesame\\Data\\Samples\\Customers.db $LastName.. \"Last\" \"Last;First;Zip;Email\" 1 1 | D:\\Perl\\bin\\perl.exe G:\\inetpub\\wwwroot\\BuildPage.pl");
exit(0);
The second one which I named BuildPage.pl contains the following. Note: The font size is set to be pretty big as this was displayed at the Sesame User's Conference on the big screen.
while ($input = <STDIN>)
{
#print($input);
my @records = split(/\n/, $input);
foreach my $line (@records)
{
@fields = split(/;/, $line);
print "<FONT SIZE=6><P><B>Last Name:</B> @fields[0]<BR>";
print "<B>First Name:</B> @fields[1]<BR>";
print "<B>Zip Code:</B> @fields[2]<BR>\n";
print "<B>E-Mail Address</B> <A HREF=\"Mailto:@fields[3]\">@fields[3]</A></FONT></P><BR>\n";
}
}
The form that calls the first perl script is just a simple form. It's source code is as follows.
<html>
<head>
<title>Extractor Report</title>
</head>
<body>
<form method="GET" action="extractor2.pl">
<p><b><font face="Verdana" size="2">Please enter the beginning of the Person's Last Name,<BR>and then click the Submit button.</font></b><br>
<input type="text" name="MyField" size="20" value="">
<input type="submit" value="Submit" name="B1"></p>
</form>
</body>
</html>
If you already own extractor and bought it before the Sesame 1.1 release, you will want to contact Customer Service and ask them for the latest version of extractor. The older version of extractor will not work with Sesame 1.1.0
-Ray