The problem you are asking about is:
$sql = "select distinct Volunteer from Volunteer where Volunteer =? an +d Date =?"; my $sth = $dbh->selectcol_arrayref( $sql, undef, $name, $date );
You setup the sql statement but never execute it.|
Update: as particle and jellyfish have pointed out I was off on this. The $dbh handle is undefined at this point.

You have some other problems in your code that are making it difficult for you to find errors like these.
  • You are not running under warnings, I know this because I spotted you problem when I ran this script under warnings and it gave me Can't call method "selectcol_arrayref" on an undefined value
  • You are also not running under use strict


  • You will find it daunting when you first turn on strict and warnings on this script (I got around 45 errors when I ran your script with warnings and strict), but trust as someone who was in a similar situation, It's not that bad. It'll take you 30 minutes to get rid of those errors, but I will <cajun chef>guarantee</cajun chef> you will save hours of debugging.

    grep
    grep> cd /pub
    grep> more beer

    In reply to Re: Why won't my form print to screen by grep
    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.