0

how to get the value of input box while submitting the form in php

i need the url like this www.example.com/te/?a=test&firstname=blabla

<form action="te/?a=test" method="post">

<input type="text" name="firstname" />


<input type="submit" name="button" />

</form> 
1
  • Welcome to SO. Please provide a clearer description of what values you want to grab at which point exactly. Do you need the values before or after the form is submitted? Commented May 7, 2010 at 15:31

2 Answers 2

1
<form action="te/" method="get">
  <input type="hidden" name="a" value="test" />
  <input type="text" name="firstname" />
  <input type="submit" name="button" />
</form> 
Sign up to request clarification or add additional context in comments.

Comments

0

Change your form method to be "get" instead.

That'll give you the results you're expecting.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.