using checkbox in php trying to read information
<p>I have a php file that reads in information from a txt file and prints it on the screen into lines such as </p>

<p>1st line [ x ]<br>2nd line[ x ]
etc etc etc</p>

<p>i am trying to add checkboxes next to all the lines of information, i managed to do a for loop that creates checkboxes depening on how many lines are read.</p>

<p>Now the final thing which i am stuck on is that i want the user to be able to click on any checkboxes and then click the submit button which should print out the chosen information on a new php file. </p>

<p>If the user ticked 1st line and submitted then it should display the text string "1st line" on the opening php file</p>

<p>I done some research and managed to use isset method to find out if it was checked, that worked but im still unsure how to read the information that was checked onto a new php file any help would be  appreciated thank you</p>

<pre><code>$filename = "file.txt";

$filepointer = fopen($filename, "r"); //open for read

$myarray = file ($filename);

// get number of elements in array with count
for ($counts = 0; $counts &lt; count($myarray); $counts++)

{ //one line at a time
$aline = $myarray[$counts];

//$par = array();
$par = getvalue($aline);

if ($par[1] &lt;= 200) 
{ 

print "&lt;input type=checkbox name='test'/&gt;"." ".$par[0]." "; 
print $par[1]." ";
print $par[2]." ";
print $par[3]." ";

}

}
</code></pre>
