When i click one checkbox code below workes fine but, more than one, noo. I cant find the problem. Can you help me please?

1st page.

<td><input type="checkbox" name="checkboxReceipt<?php echo "[$newArray[id]]"; ?>" value="<?php echo $newArray['id']; ?>" id="checkboxReceipt"></td>

2nd page.

if (isset($_POST['checkboxReceipt'])){
   $sql="UPDATE payment SET";
      foreach ($_POST['checkboxReceipt'] as $key=>$value)
         $sql.=" Ref='xxx', date='xx-xx-xxxx' WHERE id='$checkedReceipt[$key]',";
   $run = mysql_query($sql);

Just by breezing over the code, it looks like you are trying to update one row with two or more values. If so, you'll have to concatenate them before the update.

i think you have use check box in this way....

<input name="checkboxReceipt[]" value="<?php echo $frow['id']; ?>" type="checkbox"  />

Solved with code below.

foreach ($checkedReceipt as $key=>$value) {
     $sql="UPDATE payment SET Ref='xxx', date='xxxx-xx-xx'  WHERE id='$checkedReceipt[$key]'";	
  $run = mysql_query($sql);