Saturday, May 26, 2018

How to get input field value using PHP



I have a input field as follows:







I would like to get the input fields value Car Loan and assign it to a session. How do I do this using PHP or jQuery?


Answer



Use PHP's $_POST or $_GET superglobals to retrieve the value of the input tag via the name of the HTML tag.



For Example, change the method in your form and then echo out the value by the name of the input:



Using $_GET method:









To show the value:







Using $_POST method:








To show the value:






No comments:

Post a Comment

plot explanation - Why did Peaches' mom hang on the tree? - Movies & TV

In the middle of the movie Ice Age: Continental Drift Peaches' mom asked Peaches to go to sleep. Then, she hung on the tree. This parti...