Have you examined the HTML that your program in generating? I mean, you say that the only thing that appears is the "Thank you..." statement. Have you done a "View Source" to see what's actually being output to the browser? I'm asking because you're doing a lot of "start_Th" without a corresponding "end_Th", and "start_td" without "end_td". If you're going to use the special start and end tags in CGI.pm (which you declared with a "use CGI qw(*table *Tr *th *td)" right?) you have to make sure you use the closing tags or your HTML will come out all mangly and stuff and your page won't render.

Alternatively instead of doing this:

print $query->start_table({-align=>'center'}), $query->start_Tr({bgcolor=>'#9933FF'}), $query->start_th({-align=>'center', -colspan=>5}), $query->stron +g('VOLUNTEER'), $query->start_th({-align=>'center', -colspan=>5}), $query->stron +g('DATE'), $query->start_th({-align=>'center', -colspan=>5}), $query->stron +g('UNDO'), $query->end_Tr; $query->start_Tr({bgcolor=>'#99FF99'}), $query->start_td({-align=>'center', -colspan=>5}), $query->stron +g($name), $query->start_td({-align=>'center', -colspan=>5}), $query->stron +g($signup_date), $query->start_td({-align=>'center', -colspan=>5}), $query->chec +kbox(-name=>"remove",-value=>$signup_date), $query->end_Tr; print $query->end_table;
You could do this instead:
#!/usr/bin/perl use CGI qw(:standard); print table({-align=>'center'}, Tr({bgcolor=>'#9933FF'}, th({-align=>'center', -colspan=>5}, [strong('VOLUNTEER'), strong('DATE'), strong('UNDO')] ) ), Tr({bgcolor=>'#99FF99'}, td({-align=>'center', -colspan=>5}, [strong($name), strong($signup_date), checkbox(-name=>"remove",-value=>$signup_date)] ) ) );
This does exactly the same thing and it's a lot easier to read (and debug!) as well. You also don't have to worry about the closing tags 'cause CGI.pm will take care of them for you.

Gary Blackburn
Trained Killer


In reply to Re: Why won't my form print to screen by Trimbach
in thread Why won't my form print to screen by mnlight

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.