php - Read the form field type after the submit? -
using php, after form has been submitted via "post"...
i trying detect if input type hidden.
fyi: each hidden input has different name , different id.
example:
<input type="hidden" id="uniqueid1" name="somename1" value="99" />
any suggestions welcome.
do this:
assign fields array names.
<input type="hidden" id="uniqueid1" name="hidden[somename1]" value="99" />
after form submit, in php.
<?php if (! empty($_post)) { foreach ($_post $k => $v) { if ($k == 'hidden') { // here if field hidden one. if (! empty($v)) { foreach ($_post $hidname => $hidvalue) { } } } } } ?>
Comments
Post a Comment