#!/usr/bin/perl use DBI; require "table.pl"; $dbh = DBI->connect( $database, $dbuser, $dbpass ); $column1 = ""; $cnt = 0; $sponsored = 0; #@clauses = ("grade='?' OR grade='' ORDER BY childName", "grade='PK' ORDER BY childName", "grade='K' ORDER BY childName", "grade >= 1 ORDER BY grade,childName"); #"grade='PK' ORDER BY childName" #"grade='?' OR grade='' ORDER BY childName" $cursor = $dbh->prepare( "SELECT * FROM $table ORDER BY age*1" ); $cursor->execute; while ( @field = $cursor->fetchrow ) { if ( $field[$sponsoridx] == 1 ) { $row = qq |
First Name | Grade | Age | Gender | When I Grow Up I Want to Be... | Favorite Color | Favorite Book | For Fun I... |
---|
Unwrapped gifts will be accepted through $deadlineText by the Little Match Girl Foundation, Monday through Friday between 9am and 5pm, at the offices of Gerber Ciano (70 Niagara Street, Suite 211, Buffalo, NY 14202). Volunteers from the Little Match Girl Foundation will then wrap the gifts and ensure their delivery to the students in time for Christmas.
Donations of wrapping paper, tape, and bows also are welcome!
We have $phrase left in the $year Buffalo Christmas Wishes drive.
$out
|;
sub parse_form_data {
local( *FORM_DATA ) = @_;
local( $request_method, $query_string, @key_value_pairs,
$key_value, $key, $value );
$request_method = $ENV{'REQUEST_METHOD'};
if ( $request_method eq "GET" ) {
$query_string = $ENV{'QUERY_STRING'};
} elsif ( $request_method eq "POST" ) {
read( STDIN, $query_string, $ENV{'CONTENT_LENGTH'} );
} else {
&return_error( 500, "Server Error",
"Server uses unsupported method" );
}
@key_value_pairs = split( /&/, $query_string );
foreach $key_value ( @key_value_pairs ) {
( $key, $value ) = split( /=/, $key_value );
$value =~ tr/+/ /;
$value =~ s/%([\dA-Fa-f][\dA-Fa-f])/pack ("C", hex ($1))/eg;
if ( defined($FORM_DATA{$key}) ) {
$FORM_DATA{$key} = join( ", ", $FORM_DATA{$key}, $value );
} else {
$FORM_DATA{$key} = $value;
}
}
}
sub return_error {
local( $status, $keyword, $message ) = @_;
print "Content-type: text/html", "\n";
print "Status: ", $status, " ", $keyword, "\n\n";
print <$keyword
$message
Please contact $webmaster for more information.
End_of_Error
exit( 1 );
}
sub hexit {
local( $string ) = @_;
$string =~ s/\W/'%' . unpack( "H2", $& )/eg;
return( $string );
}