How to I write to my .txt file, the data captured from a series of checkboxes?
The value of the checkbox is displayed on the processed page, but nothing gets written to the .txt file.
Here's my code:
<?
$number=count($checkbox);
for($a=0;$a<=$number;$a++)
{
echo $checkbox[$a];
}
$outputstring = $checkbox[$a]."\n";
// open file for appending
@ $fp = fopen("checkbox.txt", "a");
flock($fp, 2);
fwrite($fp, $outputstring,strlen ( $outputstring ));
flock($fp, 3);
fclose($fp);
?>