Using PHP, I produce an HTML page which contains several forms. There's one form for every record selected from a MySQL table. Typically 4 or 5 forms in a web page.
Each form contains two buttons and a text area. One button is for 'Update' and the other button is for 'Delete'. The name (and id) of each button is 'U$key' and 'D$key' respectively where $key contains the primary key of the record displayed in the text area.
When the end user clicks on one of these buttons, how should my PHP script determine which button has been clicked?
I could keep a list of the keys displayed on a page in a session variable and then check the $_REGISTER array. But I was hoping that there is a simpler solution.
Andrew
Hampshire, UK
Each form contains two buttons and a text area. One button is for 'Update' and the other button is for 'Delete'. The name (and id) of each button is 'U$key' and 'D$key' respectively where $key contains the primary key of the record displayed in the text area.
When the end user clicks on one of these buttons, how should my PHP script determine which button has been clicked?
I could keep a list of the keys displayed on a page in a session variable and then check the $_REGISTER array. But I was hoping that there is a simpler solution.
Andrew
Hampshire, UK