in reply to checkbox name processing

I changed the print "<input type=checkbox name=$filename value=1>"; to print "<input type=checkbox name=select value=$filename>"; but it still don't solve yet,since it show only the last $filename checked.