Hello Monks,
I'm trying to print a table with results from a query.
When I run the script, I get a blank page. Luckily, no error messages.
Can someone take a look at my code and help me out with why I'm receiving a blank page.
Thank you.
sub get_customer
{
my ($dbh, $track_ref, @track_ref) = @_;
$dbh = WebDB::connect ();
my $sth = $dbh->prepare ("SELECT * FROM Shipments WHERE customer_id =
+?");
$sth->execute($customer_id);
while (my @track_ref = $sth->fetchrow_array ()){
push (@track_ref, Tr ({-align => "CENTER", -valign=>"TOP", -BGCOLOR=
+>"silver", -style=>"font-family: verdana; font-size: 10pt;"},
th ({-width=>"50"},("Customer ID")),
th ({-width=>"50"},("Carrier")),
th ({-width=>"90"},("Tracking Number"))
+
));
push (@track_ref, Tr ({-valign=>"center", -style=>"font-family: verdan
+a; font-size: 10pt;"},
td ($track_ref[7]),
td ($track_ref[3]),
td ($track_ref[4])
));
}
return (table ({-align => "CENTER", -border => 0}, @track_ref));
print start_form (-action => "http://wwwapps.ups.com/tracking/tracking
+.cgi", -method => "POST"),
table (
Tr (
td ("UPS Tracking Number:"),
td (textfield (-name => "tracknum"))
),
),
submit (-name => "choice", -value => "Track"),
end_form ();
}
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.