I am a newbie in Perl CGI . My code is shown below .
#!c:/xampp/perl/bin/perl.exe
use warnings;
use CGI;
my $q = CGI->new;
print $q->header;
print "<html><head><title>Test</title></head>\n";
print '<body>';
@server = $q->param('sel');
if (!@server)
{
print '<p> please select a checkbox</p>';
exit;
}
else
{
print '<form action="next.pl" method="POST" id="sel" >';
foreach my $i (@server) {
print '<input type="checkbox" name="DEL" value="';
print $i;
print ' checked ">';
print $i;
print '<br />';
}
print '<input type="submit" value="Kill">';
print '<form>';
print '</body></html>';
}
In the first part of the code i am getting the list of checkboxes ticked from the previous program using the checkbox name "sel" and storing it in an array server. I am using the same array in foreach loop and making it a checkbox with a name.
Now in my above code I don't want the checkboxes to be displayed . I want only submit button to be displayed. When i click the submit button i want my checked checkboxes in the form to go to next page.
How can i achive this . Please help .