Whats wrong with my code?
Posted: Thu Dec 04, 2003 9:59 pm
Anybody see what is wrong with this script?
This is what it prints on screen:
I'm just trying to get it to print out a list of check boxes, and check the ones that should be checked, by compairing two values from two different arrays.
Thanks for any help you can offer!!!
Code: Select all
<?php
$reset_data_seek = $row_FiletoPagelist['file'];
while ( $row = mysql_fetch_array($filelist) ) {
$test_value = $row['ID'];
echo "<input name='selectedfile[]' type='checkbox' value='" . $test_value . "'";
while ( $row2 = mysql_fetch_array($FiletoPagelist) ) {
if ( $row2['file'] == $test_value ) {
echo " checked";
}
echo ">";
}
mysql_data_seek ($row2,$reset_data_seek);
}
?>Line 104 is the line containing the mysql_data_seek()[form check box here, unchecked] checked>
Warning: mysql_data_seek(): supplied argument is not a valid MySQL result resource in /home/gregoryj/public_html/manage/manage/test.php on line 104
[form check box, unchecked] Warning: mysql_data_seek(): supplied argument is not a valid MySQL result resource in /home/gregoryj/public_html/manage/manage/test.php on line 104
I'm just trying to get it to print out a list of check boxes, and check the ones that should be checked, by compairing two values from two different arrays.
Thanks for any help you can offer!!!