I have a form that dynamically generates Submit buttons. I want all the buttons to display the same text "More info" while their names are dynamically generated numeric names (they point to database record numbers).
Obviously when the form returns, only one button will have been clicked. So I want to look in $_POST for a value "More info" and then ask the name of the button! The integer value of the name will be the record I display to the user, containing the More info they wanted. I have this working fine the other way round - when the value is the record number (ie the record number shows on the button face) - but I don't want the numbers showing.
So my question is, how can I get the name of a form element returned, based on finding an element in the $_POST array with the desired value?
Obviously when the form returns, only one button will have been clicked. So I want to look in $_POST for a value "More info" and then ask the name of the button! The integer value of the name will be the record I display to the user, containing the More info they wanted. I have this working fine the other way round - when the value is the record number (ie the record number shows on the button face) - but I don't want the numbers showing.
So my question is, how can I get the name of a form element returned, based on finding an element in the $_POST array with the desired value?
Comment