php - Accessing form input by ID -


this question has answer here:

i know in php have $_get, $_post, , $_request access form input through names in html tags. possible same ids? example:

<form> first name: <input type="text" id="firstname"><br> last name: <input type="text" id="lastname"> </form>  

in php:

$f_name = $_get['firstname']; 

when submitting form, input fields name attribute submitted. add name attribute same id, or javascript hack populate name attributes on form submit.


Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -