I have an HTML input field, and I have every input field specified with some id, now how can I use this input field id to identify the field.
Example:
<input type='text' id='float' name='attributename' value='' maxlength='30'/>
I need to verify the id of input field for float and then insert the input field's value in to db in particular field.
Please help me out..
Yes, deceze put it best.
Basically, everything in PHP (and all of web programming) requires key = value pairs. So, if you have no key, you in turn have no value. If the form element has only an ID and no NAME, then the variable that is passed to PHP will not exist.
The best way to test, is to have your HTML form element test with a "GET" instead of a "POST", this way, you will see the key=value pairs in the address bar when the form is submitted to the method by the action. All then you must do is use
$_GET
instead of$_POST
to pull the variables.