I have the first page set up.
This page captures the login id using the remote_user() function.
It displays the days that are available for signup and
gives them a link to click on which passes the user, date,
and volunteer number to a second script that
updates the database. It also has the user identify themselve as the Father or Mother of the player.
This is done using a form (radio_group()). I have been able to pass all parms to the second script except for the name parm from the form

#!/usr/bin/perl -w #Volunteer.pl - Sign up sheet for Volunteers use strict; use DBI; use CGI qw(:standard); use CGI::Pretty; use CGI::Cookie; my $query = CGI::Pretty->new; #my $query = CGI::new; my ($dbh, $sth); my @val= (); my $user = $query->remote_user(); $dbh = DBI->connect ("DBI:mysql:host=localhost;database=<database>", "mnlight","<password>", {PrintError=> 0, RaiseError=> 1}); $sth = $dbh->prepare ("SELECT * FROM Volunteer where Volunteer = 'TBD' +"); $sth->execute (); print header(), start_html ("Volunteer SignUp Form"); print "<body bgcolor=#FFFFF1>"; print "<p><hr><p>"; print "<CENTER>"; print "<TABLE WIDTH='100%'BORDER='1' CELLSPACING='1' CELLPADDING='7'>" +; print "<TR>"; print "<TH bgcolor='#9933FF'><font size='5'color='#FFFFFF'><center><st +rong>MN LIGHTNING 90 SignUp Sheet</font></strong></center> <br><font size='2'color='#FFFFFF'><center>To sign up for a time simply + select the botton indicating if you are the players Mothe r or Father.<br> Then click the TBD link in the Volunteer column and y +our name will appear on the verification form.</font></cen ter></th>"; print "</TR>"; print "</TABLE>"; print $query->start_form('POST','./Signup.pl'); print $query->radio_group( -name =>'Parent', -value =>["Father", "Mother"], -default=>["NO DEFAULT"], -linebreak=>'true', -columnheader=>'Parent'); print $query->end_form(); while (my @val = $sth->fetchrow_array ()) { print "<TR>"; print "<TH WIDTH='10%' VALIGN='TOP' BGCOLOR='#99FF99'>"; print "<FONT SIZE='2' COLOR='#9933FF'>"; # Signup2.pl still needs work... print "<A HREF=./Signup.pl?$user&$val[2]&$val[3]>$val[0]</th>"; print "<TH WIDTH='10%' VALIGN='TOP' BGCOLOR='#99FF99' align='center' +>"; print "<FONT SIZE='2' COLOR='#9933FF'>$val[1]</th>"; print "<TH WIDTH='10%' VALIGN='TOP' BGCOLOR='#99FF99' align='center' +>"; print "<FONT SIZE='2' COLOR='#9933FF'>$val[2]</th>"; print "<TH WIDTH='10%' VALIGN='TOP' BGCOLOR='#99FF99' align='center' +>"; print "<FONT SIZE='2' COLOR='#9933FF'>$val[3]</th>"; print "</TR>"; }

Do I need to pass name from the form to the reference in the table before it gets passed to the script? What is missing?


In reply to Passing a form parm and a url reference to a different script 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.