Here is my html file using tmpl_var to display a list of files names, selection of time, selection type
<table> <TMPL_LOOP NAME="files_loop"> <tr> <td><TMPL_VAR NAME ="index"></td> <td><TMPL_VAR NAME ="fn"> </td> <td class="form"><select name="files234p"> <option value = "0">- Select -</option> <option value = "1 ">1 Sec Delivery</option> <option value = "10 ">10 Sec Delivery</option> <input type="hidden" name="file" value="<TMPL_VAR NAME="fn">"> + </select></td> </tr></TMPL_LOOP></table>
In my cgi script, I was able to display the output in a format of a table, 1st column - index #, 2nd column-list of filenames, 3rd column- it's a selection box of "time". my problem is getting the filenames using $q->param.
foreach my $value ($q->param('files234p')) { if ($value != 0) { my $filen = $qq->param('file'); print FOUT $filen," ",$value, "\n"; $i++; } }
when I select 1st row selection box with 1 sec, then 2nd row selection box with 10 sec. 3rd file with 1 sec. my output shows :
file1 1 file1 10 file1 1 it should be : file1 1 file2 10 file3 1
I am not getting filenames correctly, it stays as the 1st one. Can any one help please. is it the $q->param incorrectly used
In reply to TMPL_VAR with selection box by bebewinla
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |