This printed out one check box (insted of one checkbox for each item in the array). it also gave me a warning:
Warning: mysql_data_seek(): supplied argument is not a valid MySQL result resource in /home/public_html/test.php on line 104
Code: Select all
<?php
while ( $row = mysql_fetch_array($filelist) ) {
$test_value = $row_filelist['ID'];
echo "<input name='selectedfile[]' type='checkbox' value='" . $test_value . "'";
while ( $row2 = mysql_fetch_array($FiletoPagelist) ) {
if ( $row2_FiletoPagelist['file'] == $test_value ) {
echo " checked>";
}
else {
echo ">";
}
}
mysql_data_seek ($FiletoPagelist['file'],0);
}
?>