Hi, i would like to know if its possible when submitting a form execute a php script that creates a dinamic table with data from a txt file and checkboxes, it is possible to use that checkboxes and data? how?
This is the code execute after submitting the previous form:
and i would like to use the names of the packages selected by the user and put them into a txt.
This is the code execute after submitting the previous form:
<?php
echo "<table id='tablapaquetes' border = '1'> \n";
echo "<tr>";
$i=0;
$fichero='/var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_gutsy_universe_binary-i386_Packages';
$archivo = fopen ($fichero, "r");
while (!feof ($archivo)){
//si extraigo una lÃnea del archivo y no es false
while($linea = fgets($archivo))
{
if (($linea[0] == 'P') && ($linea[1] == 'a')&& ($linea[2] == 'c'))
{
$temp=substr ($linea, 9, 40);
$pack=trim($temp);
}
if(($linea[0]=='S')&&($linea[1]=='e')&&($linea[2]=='c'))
{
$temp=substr ($linea, 18, 40);
$seccion=trim($temp);
if(($seccion[0]=='x')&&($seccion[1]=='1'))
{
echo "<td><INPUT type='checkbox' name='";
echo "check'.$i.''></td>";
echo "<td width='20' align='center' bgcolor='#CCCCCC'><strong>$pack</strong></td>";
echo "<td width='20' align='center' bgcolor='#CCCCCC'><strong>$seccion</strong></td>";
echo "</tr>";
$i++;
}
}
}
}
echo $i;
echo "</table>";
?>
and i would like to use the names of the packages selected by the user and put them into a txt.