We have 2 variables, $id
and $title
.
And a form field for a new $title
variable:
foreach ($ids as $id) {
$id_title = $title;
?>
<input name="new_<?php echo $id; ?>_title" value="<?php echo $id_title; ?>" />
<?php } ?>
How to check, is $id_title
has been changed in the form, and do something if it is.
Like:
if ($id_title != $new_id_title) {
make db query
}
There can be more than one input field on the page, different for each $id
, we should check all of them.
Thanks.