I have a little script here, my very first after the 'Hello World' one. Its driving me nuts, I probable have about 10,000 errors and lots of things that could be done better but the one that concerns me is this:

Premature end of script headers: /home/mywebplace/public_html/cgi-bin/populateapp.cgi

I just cant get it to populate the pfd (yeah not my choice either). I have 2 other scripts to take the filled form and put it into SQL, and one to browes the SQL to pick the one to repopulate (for printing) and they both work fine, its repopulating that is giving me a hard time. Here is my miserable attempt at perl.
#!/usr/bin/perl use CGI qw/:standard/; use Acrobat::FDF; use DBI; $data = new CGI; my $tablenamesent = $data->param('tablename'); my $brokerclientsent = $data->param('brokerclient'); my $dbh = DBI->connect("DBI:mysql:mywebplace:localhost","myuser","mypa +ssword"); $sth = $dbh->prepare("SELECT * FROM $tablenamesent WHERE BrokerClient += ?"); $sth->execute($brokerclientsent); my($AmmountOfMortgage, $AmmountOfPurchase, $AttachCopyOf1003, $AttachCopyOfContract, $AttachCopyOfMortgageCommitment, $AttachCopyOfPresentOwnerOrTitlePolicy, $BinderNeededDate, $BrokerClient, $ClosingDate, $CopiesLenderLendersAttorney, $CopiesPurchaserBorrower, $CopiesPurchasersBorrowersAttorney, $CopiesSellerSellersAttorney, $FBByEMail, $FBByFax, $FBByMail, $FBLenderLendersAttorney, $FBPurchaserBorrower, $FBPurchasersBorrowersAttorney, $FBSellerSellersAttorney, $GlobalSalesRep, $LenderAdderss, $LenderCity, $LenderFaxNumber, $LenderName, $LenderPhoneNumber, $LenderState, $LenderZip); $sth->bind_columns(undef, \$AmmountOfMortgage, \$AmmountOfPurchase, \$AttachCopyOf1003, \$AttachCopyOfContract, \$AttachCopyOfMortgageCommitment, \$AttachCopyOfPresentOwnerOrTitlePolicy, \$BinderNeededDate, \$BrokerClient, \$ClosingDate, \$CopiesLenderLendersAttorney, \$CopiesPurchaserBorrower, \$CopiesPurchasersBorrowersAttorney, \$CopiesSellerSellersAttorney, \$FBByEMail, \$FBByFax, \$FBByMail, \$FBLenderLendersAttorney, \$FBPurchaserBorrower, \$FBPurchasersBorrowersAttorney, \$FBSellerSellersAttorney, \$GlobalSalesRep, \$LenderAdderss, \$LenderCity, \$LenderFaxNumber, \$LenderName, \$LenderPhoneNumber, \$LenderState, \$LenderZip); $outFdf = new Acrobat::FDF; $outFdf->SetFile('http://www.mywebplace.com/fdf_pdfs/App.pdf'); $outFdf->SetValue("LenderZip", $LenderZip, 0); $outFdf->SetValue("BrokerClient", $BrokerClient, 0); $outFdf->SetValue("GlobalSalesRep", $GlobalSalesRep, 0); $outFdf->SetValue("LenderState", $LenderState, 0); $| = 1; print "Content-type: application/vnd.fdf\n\n"; $outFdf->SaveToFile('-');
Thanks in advance for your wisdom.

20040330 Edit by castaway: Changed title from 'A Noob with heart...'


In reply to Premature end of script headers by CandymanCID

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • 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:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.