How do I get the name of the submit button in PHP?
I got the value of submit button, but I could not find any code to get the name of the button. Below is the code I
You will find the name in the $_POST array.
This way you will see everything in the $_POST array.
You can iterate through the array with:
foreach($_POST as $name => $content) { // Most people refer to $key => $value echo "The HTML name: $name "; echo "The content of it: $content "; }