'When submitting a form is there a way to not only send the inputs but also all the froms content?
when submitting the form and I look in the $_POST variable, then I only find the values of the form inputs. But I want to access also all the other variables. Is there a way to send them also? e.g. how could I send also the content of multiplicator1 in the variable?
<form>
<table>
<tr>
<td><input class="inputGewicht" name="inputFieldsInput1" value="0" /></td>
<td class="multiplicator" id="multiplicator1">5</td>
<td class="uniqueProduct" id="uniqueProduct1">0.00</td>
</tr>
</table>
<form>
Solution 1:[1]
You can use input type="hidden" like in following code:
<form>
<table>
<tr>
<td><input class="inputGewicht" name="inputFieldsInput1" value="0" /></td>
<td class="multiplicator" id="multiplicator1">5</td>
<td class="uniqueProduct" id="uniqueProduct1">0.00</td>
</tr>
</table>
<!-- Enter multiplicator1 and uniqueProduct1 values into input type hidden -->
<input type="hidden" name="multiplicator1" value="5">
<input type="hidden" name="uniqueProduct1" value="0.00">
<form>
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Dori Rina |