I have a php page which has multiple form tags. each form is dealing with a specific tab. It is simply a search but each tab provides a search of either date, number, or name.
each form tag has a different name….how can I know which form was submitted in the result page to customize the database search accordingly?
is it something with $_POST or $_REQUEST ?
<form name="invoice" action="result.php" method="POST"><br><br>
<form name="customer" action="result.php" method="POST"><br><br>
<form name="customer" action="result.php" method="POST"><br><br>
each of the above contains a table with input box and submit button.
Thanks,
You could, for one, in each submit button add a name and value, like so:
then in your php
Be aware though, older versions of firefox doesn’t properly submits the key => value pair of input type submit.
Another solution I usually use is to put an
<input type="hidden" name="action" value="your_customAction" />