I have a input field as follows:
<input type="text" name="subject" id="subject" value="Car Loan">
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?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Use PHP’s
$_POSTor$_GETsuperglobals 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
$_GETmethod:To show the value:
Using
$_POSTmethod:To show the value: