Please see my comment to the question. It does not seem to make a whole lot of sense. However, if you understand how things work, you will be able to decide what you want to do.
You could not find it in "official documentation", because no one is going to write a documentation section on such a weird topic. Such topic does not actually exist, just because there is no such problem per se, there is general understanding of how things work (well documented, of course), plus some simple logic. Let's follow such logic.
Here is why: Normally, if you have different forms, they usually have different values of the attribute
action
which represent some URL; through this URL you send an HTTP request to some
form processing agent:
Please see:
http://www.w3.org/TR/html4/interact/forms.html[
^],
http://www.w3.org/TR/html4/interact/forms.html#adef-action[
^].
Moreover, very typically, this URL is the same as the URL of the form. The agent code detects if something was posted and generate somewhat different page in its HTTP response, to show input data, validation results, or just to say "thank you for your information" to the user.
Imagine however, that you still need to have two form with identical values of the
action
attribute, by one or another reason. But how it possibly create a problem of "identification" of it? Remember that the forms are, apparently,
different. You cannot know in advance what would be the
data filled in the form, to take it into account in your PHP agent code. However, you know exactly what will be
metadata, which is represented by form controls and their
name
attributes. If you use forms, you should know that it's the
name
attribute which is written in the body of HTTP request as a result of form submission:
http://www.w3.org/TR/html4/interact/forms.html#control-name[
^].
And if the forms are really different,
at least some of the names of their controls should be different. Do I even have to explain why? Well, because if they are identical, the forms, from the standpoint of the processing agent, are identical, not different, even if they are actually different elements. You PHP (or any other) processing agent code only receives HTTP request text, nothing else.
And if some names are different, you can see which form it that. As you should know, PHP gets access to HTTP request parameters via the PHP array (associative container, essentially)
$_POST
. The array is indexed by the strings keys which are the same very names. If some name is not present in the form, the key of the same value does not present in the array, which you can check up using the function
isset
. This is demonstrated, for example, here:
http://www.html-form-guide.com/php-form/php-form-post.html[
^].
—SA