Gossamer Forum
Home : General : Perl Programming :

problem passing form variables

Quote Reply
problem passing form variables
this has to be something simple! i have a form that builds five radio fields: column-1, column-2, etc. when the form is submitted, i want to display the value that was selected. while testing, i'm using the following:
Code:
while ($count < 6) {
print qq|<tr><td>column-$count $in{'column-$count'}</td></tr>|;
$count++;
}
foreach $key (sort keys %in) {
if ($key =~ /column/) {
print "<tr><td>$key: $in{$key}</td></tr>\n";
}
}
the display looks like this:
column-1
column-2
column-3
column-4
column-5
column-1 Title
column-2 Description
column-3 Category
column-4 Updated
column-5 Approved

the first one doesn't work but is the one i want to use! the second one does work (displays the values selected) but i don't want to use it for other reasons. i can't figure out what's wrong with $in. i've tried it with and without the single quotes with same result.
Subject Author Views Date
Thread problem passing form variables delicia 2509 Jul 1, 2022, 1:55 PM
Post Re: [delicia] problem passing form variables
el noe 2422 Jul 14, 2022, 1:30 PM
Thread Re: [delicia] problem passing form variables
el noe 2403 Jul 19, 2022, 1:47 AM
Thread Re: [el noe] problem passing form variables
delicia 2399 Jul 19, 2022, 5:44 AM
Thread Re: [delicia] problem passing form variables
Andy 2373 Jul 22, 2022, 8:49 AM
Thread Re: [Andy] problem passing form variables
delicia 2361 Jul 22, 2022, 9:22 AM
Post Re: [delicia] problem passing form variables
Andy 2349 Jul 22, 2022, 10:15 PM