I have an HTML form that looks like this:
<form action="index.php" method="post">
<input type="hidden" value="Hidden Value" name="A Hidden Value" />
<select name="dropdownOption">
<option value="First Choice +200">First Choice</option>
<option value="Second Choice +300">Second Choice</option>
</select>
<p><input type="checkbox" value="Rocket +100"> Rocket</p>
</form>
I'm looping through the values of this form like this:
foreach($_POST as $key => $value) {
}
How would I exclude the hidden inputs from the foreach loop?
On a side note, does all versions of PHP support spaces in the input name (e.g. is valid?) In my version of PHP it automatically replaces spaces with underscores which is great, does it do that for all versions of PHP?
Thanks for any help.
data-*attributes instead.foreach().