php - Determining which Submit button was clicked, when an array of buttons is used -


i have script generates table containing numerous rows , coloumns. on each end of row, submit button, name 1 of array generated on running script, , goes like: delete_cn[0], delete_cn[1] etc.

while processing form post, need determine submit button clicked. currently, when see print_r or dump_vars, see following: ["delete_cn"]=> array(1) { [0]=> string(6) "delete" }, not give array index of button pressed.

how should best go doing this? need find array index of submit button pressed, or way uniquely identify row of submit button, process data. original form dynamically generated reading zonefile, , elements on same row arrays.

the post data include buttons 1 clicked have value. way can determine button clicked checking value in button array not empty. (the value text on button text defined in value attribute).


Comments