hello. i have a code that looks like this:
$localdir = 'C:/somedir';
$dh = opendir($localdir);
echo '<table><form method="post" action=""><input type="submit" value="Add checked" name="doneA" />';
while(($files = readdir($dh)) != false) {
if ($files != "." && $files != "..") {
echo '<tr><td><input type="checkbox" name="' . $files . '" /></td><td>' . $files . '</td></tr>';
}
}
echo '</table>';
rewinddir($dh);
unset($files);
if(isset($_POST['doneA'])) {
while(($files = readdir($dh)) != false) {
echo $_POST[$files];
}
}
echo '</form>';
closedir($dh);
however, i het the unidentified index error all the time like the checkboxes haven't been submitted. any ideas why is that?