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

Popular posts from this blog

jQuery Mobile app not scrolling in Firefox -

c++ - How to add Crypto++ library to Qt project -

php array slice every 2th rule -