I am using php and html. I have two buttons in my table as shown in the image bellow. When I press the Update button, it displayed the correct name and value properties of the Update button. However, when I press the jan_data button, it doesn't show the properties of that button. Instead it shows the name and value properties of the Description text box. I am new to html and can you please tell me what modifications I should do to get the correct value of the jan_data button when I click it. (not allowed to use JavaScript in my website).
<?php
echo "<form action=\"\" method=\"POST\">
<table border=\"1\"><tbody>
<tr>
<td>January:</td>
<td><input id=\"WorkOrder1\" type=\"text\" name=\"val1\" value=\"$\" /><input type=\"submit\" name=\"january_box\" value=\"jan_data\" /></td>
<td>february:</td>
<td><input id=\"WorkOrder2\" type=\"text\" name=\"val2\" value=\"$\" /></td>
<td>March:</td>
<td><input id=\"WorkOrder3\" type=\"text\" name=\"val3\" value=\"$\" /></td>
</tr>
<tr>
<td>April:</td>
<td><input id=\"WorkOrder4\" type=\"text\" name=\"val4\" value=\"$\" /></td>
<td>May:</td>
<td><input id=\"WorkOrder5\" type=\"text\" name=\"val5\" value=\"$\" /></td>
<td>June:</td>
<td><input id=\"WorkOrder6\" type=\"text\" name=\"val6\" value=\"$\" /></td>
</tr>
<tr>
<td>Description:</td>
<td colspan=\"5\"><input type=\"text\" name=\"description_box\" value=\"description_data\" size=\"44\" /></td>
</tr>
</tbody></table>
<input type=\"submit\" name=\"updatebutton\" value=\"Update\" /></form>";
foreach($_POST as $key => $value){} //Only needs to find which button is pressed
echo "<br>key is: $key<br>";
echo "value is: $value<br>";
?>

echo statementsare out of theforEach block, please see the{}echoonly for smaller pieces of HTML; use?><html><?phpfor bigger chunks.