<input type="hidden" name="linea" value="$i">
<input type="hidden" name="linea" value="<?php echo $i;?>">