Hello,
I am trying to add a checkbox with multiple items that can be selected from a form to show up on a page once selected... I have it sort of working but only one of the selected checked items shows up instead of the multiple selected items... I am sort of new working with perl scripts so I'm not sure if I have this right, I'm kinda lost, please advise...
ok, here's what I have so far; I've posted it in sections...
--------------------------------------------
# These are the interests categories for the user pages.
$interests_1 = "Arts & Crafts";
$interests_2 = "Community Service";
$interests_3 = "Dancing";
$interests_4 = "Dining";
$interests_5 = "Family";
$interests_6 = "Movies";
$interests_7 = "Music";
$interests_8 = "Outdoor Activities";
$interests_9 = "Photography";
$interests_10 = "Religion/Spiritual";
$interests_11 = "Sports";
$interests_12 = "Theater";
$interests_13 = "Travel";
-------------------------------------------
# This is the checkbox of interests for the main page.
print "<TABLE CELLPADDING=1 CELLSPACING=2 BORDER=0>\n<TR>\n";
print "<p><select name=\"interests\" size=\"1\">\n";
print "<TD VALIGN=TOP><P>\n";
print "<INPUT TYPE=CHECKBOX NAME=\"interests\" VALUE=\"$interests_1\"> Arts & Crafts<BR>\n";
print "<INPUT TYPE=CHECKBOX NAME=\"interests\" VALUE=\"$interests_2\"> Community Service<BR>\n";
print "<INPUT TYPE=CHECKBOX NAME=\"interests\" VALUE=\"$interests_3\"> Dancing<BR>\n";
print "<INPUT TYPE=CHECKBOX NAME=\"interests\" VALUE=\"$interests_4\"> Dining<BR>\n";
print "<INPUT TYPE=CHECKBOX NAME=\"interests\" VALUE=\"$interests_5\"> Family<BR>\n";
print "<INPUT TYPE=CHECKBOX NAME=\"interests\" VALUE=\"$interests_6\"> Movies<BR>\n";
print "<INPUT TYPE=CHECKBOX NAME=\"interests\" VALUE=\"$interests_7\"> Music<BR>\n";
print "</TD>\n";
print "<TD VALIGN=TOP><P>\n";
print "<INPUT TYPE=CHECKBOX NAME=\"interests\" VALUE=\"$interests_8\"> Outdoor Activities<BR>\n";
print "<INPUT TYPE=CHECKBOX NAME=\"interests\" VALUE=\"$interests_9\"> Photography<BR>\n";
print "<INPUT TYPE=CHECKBOX NAME=\"interests\" VALUE=\"$interests_10\"> Religion/Spiritual<BR>\n";
print "<INPUT TYPE=CHECKBOX NAME=\"interests\" VALUE=\"$interests_11\"> Sports<BR>\n";
print "<INPUT TYPE=CHECKBOX NAME=\"interests\" VALUE=\"$interests_12\"> Theater<BR>\n";
print "<INPUT TYPE=CHECKBOX NAME=\"interests\" VALUE=\"$interests_13\"> Travel<BR>\n";
print "</TD>\n";
print "</blockquote>\n";
print "</TR>\n";
print "</TABLE>\n";
--------------------------------------------
sub preview_html {
print "<center><strong><em>$user_input{'interests'}</strong></em></center>\n";
}
---------------------------------------------
Thank You
I am trying to add a checkbox with multiple items that can be selected from a form to show up on a page once selected... I have it sort of working but only one of the selected checked items shows up instead of the multiple selected items... I am sort of new working with perl scripts so I'm not sure if I have this right, I'm kinda lost, please advise...
ok, here's what I have so far; I've posted it in sections...
--------------------------------------------
# These are the interests categories for the user pages.
$interests_1 = "Arts & Crafts";
$interests_2 = "Community Service";
$interests_3 = "Dancing";
$interests_4 = "Dining";
$interests_5 = "Family";
$interests_6 = "Movies";
$interests_7 = "Music";
$interests_8 = "Outdoor Activities";
$interests_9 = "Photography";
$interests_10 = "Religion/Spiritual";
$interests_11 = "Sports";
$interests_12 = "Theater";
$interests_13 = "Travel";
-------------------------------------------
# This is the checkbox of interests for the main page.
print "<TABLE CELLPADDING=1 CELLSPACING=2 BORDER=0>\n<TR>\n";
print "<p><select name=\"interests\" size=\"1\">\n";
print "<TD VALIGN=TOP><P>\n";
print "<INPUT TYPE=CHECKBOX NAME=\"interests\" VALUE=\"$interests_1\"> Arts & Crafts<BR>\n";
print "<INPUT TYPE=CHECKBOX NAME=\"interests\" VALUE=\"$interests_2\"> Community Service<BR>\n";
print "<INPUT TYPE=CHECKBOX NAME=\"interests\" VALUE=\"$interests_3\"> Dancing<BR>\n";
print "<INPUT TYPE=CHECKBOX NAME=\"interests\" VALUE=\"$interests_4\"> Dining<BR>\n";
print "<INPUT TYPE=CHECKBOX NAME=\"interests\" VALUE=\"$interests_5\"> Family<BR>\n";
print "<INPUT TYPE=CHECKBOX NAME=\"interests\" VALUE=\"$interests_6\"> Movies<BR>\n";
print "<INPUT TYPE=CHECKBOX NAME=\"interests\" VALUE=\"$interests_7\"> Music<BR>\n";
print "</TD>\n";
print "<TD VALIGN=TOP><P>\n";
print "<INPUT TYPE=CHECKBOX NAME=\"interests\" VALUE=\"$interests_8\"> Outdoor Activities<BR>\n";
print "<INPUT TYPE=CHECKBOX NAME=\"interests\" VALUE=\"$interests_9\"> Photography<BR>\n";
print "<INPUT TYPE=CHECKBOX NAME=\"interests\" VALUE=\"$interests_10\"> Religion/Spiritual<BR>\n";
print "<INPUT TYPE=CHECKBOX NAME=\"interests\" VALUE=\"$interests_11\"> Sports<BR>\n";
print "<INPUT TYPE=CHECKBOX NAME=\"interests\" VALUE=\"$interests_12\"> Theater<BR>\n";
print "<INPUT TYPE=CHECKBOX NAME=\"interests\" VALUE=\"$interests_13\"> Travel<BR>\n";
print "</TD>\n";
print "</blockquote>\n";
print "</TR>\n";
print "</TABLE>\n";
--------------------------------------------
sub preview_html {
print "<center><strong><em>$user_input{'interests'}</strong></em></center>\n";
}
---------------------------------------------
Thank You