tags:

views:

135

answers:

2

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> 
A: 

Change your form method to be "get" instead.

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

Stephen Orr
+1  A: 
<form action="te/" method="get">
  <input type="hidden" name="a" value="test" />
  <input type="text" name="firstname" />
  <input type="submit" name="button" />
</form> 
Dolph