forms - how to get a input field's name via PHP GET -


there example want do: http://www.w3schools.com/html/tryit.asp?filename=tryhtml5_input_type_datetime

in example, if change input's name, on right side of screen (after submitting code), you'll see changed name. , also, can see there no hidden input field name of input automatically. because searched answers , "use hidden input field" in this: how access form's 'name' variable php need in w3schools.

of course .asp example hope there way via php also? in advance.

to input field name using post method.

you can use $get or $request instead of $post.

$request use both , post. in php $post 1 type of associative array.

<?php $temp= array(); if (isset($_post['submit']) && !empty($_post['submit'])) {     foreach ($_post $key => $val) {         //$key name wanted, , $val value of input         $temp[] = $key;     } } ?> 

Comments

Popular posts from this blog

c# - How to get the current UAC mode -

postgresql - Lazarus + Postgres: incomplete startup packet -

javascript - Ajax jqXHR.status==0 fix error -