Hi all:
I\'m having a minor yet frustrating checkbox problem:
I have 6 checkboxes hard-coded into an HTML form:
<input type=\"checkbox\" name=\"like_to_see[0]\" value=\"statistics\">
<input type=\"checkbox\" name=\"like_to_see[1]\" value=\"statistics\">
<input type=\"checkbox\" name=\"like_to_see[3]\" value=\"statistics\">
//etc etc
The specific part of the processing script is:
while($row = mysql_fetch_array($result)) {
$date = $row[\'date\'];
$name = $row[\'name\'];
$email = $row[\'email\'];
$ext = $row[\'ext\'];
$dept = $row[\'dept\'];
$comments = $row[\'comments\'];
$like_to_see = $row[\'like_to_see\'];
while($x = each($like_to_see)) {//line 98
$disp = $disp . \"$x[0] => $x[1]<br>\";
}//end-2nd while
}//end 1st while
Yet I get the following error message on the procesing script:
Warning: Variable passed to each() is not an array or object in /www/httpd/html/intranet_questionnaire/questionnaire.php on line 98
I\'m sure there\'s probably something wrong with the code here somewhere but not being a programmer as such (little knowledge of loops etc) then I\'m unsure of what to do to get it to work.
My environment is php4.0.3pl1 and MySQl 3.22.32
If anyone can help me out I\'d be most grateful.
Cheers.
Russ