Sorry, $num=0 should be set before "$itemnum = array($num)". When the action of multiple items is submit in rep_message_ops.php , only the first element(ID) of array is used or rep_message_ops.php doesn't work.