I am trying to update a group of things at once.
All the fields update except for a checkbox that I use to set the item to display or not.
here's a snippit:
Code: Select all
$num_rows = count($fid);
for($i = 0; $i < $num_rows; ++$i):
$update = "UPDATE faqs SET question = "$questionї$i]", answer = "$answerї$i]", display = "$displayї$i]" WHERE fid = "$fidї$i]"";
$result = mysql_query($update) or die ("Could not update");
endfor;
Here's the display checkbox code setup:
if($display == yes):
echo"<input type = checkbox name = displayї] value = yes checked>";
else:
echo"<input type = checkbox name = displayї] value = yes>";
endif;