Jithu Jithu - 6 months ago 34
PHP Question

How to find which input field is modified?

I have couple of input field and values in them. This is projected to the user.
The user can modify these values and submit them.
When submitted, I need to check which input field is modified.

I can compare the previous fields and current fields and check. But I am trying to find more optimized way to do this.
I can use javascript, php, jquery and html tricks

<input id="input1" value="someValue" type="text">
<input id="input2" value="someValue" type="text">


  var id = $(this).attr('id');
  alert("input field is modified : ID = " + id);