They are in separate variables in the @deletes array.
$deletes[0] # contains first $oid to delete $deletes[1] # contains second $oid to delete ... $deletes[n] # contains n+1 th .....
Here is how you use your array. Assunimg that $oid contains a filepath to a file you want to delete this will do that.
<code> #/usr/bin/perl -w use CGI; use CGI::Carp('fatalsToBrowser'); use strict; my $q = new CGI; my @deletes = $q->param('delete_this_value'); print "Content-type: text/plain"; foreach my $oid (@deletes) { # you get the value of $oid here for all checked boxes &do_delete($oid); } sub do_delete { my $oid_to_delete = shift; unlink $oid_to_delete or die "Can't unlink $oid $!\n"; print "Deleted $oid_to_delete\n"; }
cheers
tachyon
s&&rsenoyhcatreve&&&s&n.+t&"$'$`$\"$\&"&ee&&y&srve&&d&&print
In reply to Re: Re: Re: Multiple Check boxes and Handling
by tachyon
in thread Multiple Check boxes and Handling
by nlafferty
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |