php - Use form button to submit GET value -


i have following code submit values:

<form method="get">  <input type="hidden" name="price" value="asc" />   <input type="submit" value="price low high" /> </form>  <form method="get">  <input type="hidden" name="price" value="desc" />   <input type="submit" value="price high low" /> </form>  <form method="get">  <input type="hidden" name="price" value="" />   <input type="submit" value="default" /> </form> 

which working fine. not repeating myself 3 forms, there way have single form, , define values submitted buttons? still need have same information visible user e.g. button submits desc needs display price high low

use code:

<form method="get">   <input type="submit"  name="price" value="asc">price low high</input>   <input type="submit" name="price" value="desc"  >price high low</input>   <input type="submit" name="price" value="" >default</input> </form> 

Comments

Popular posts from this blog

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

How to get the ip address of VM and use it to configure SSH connection dynamically in Ansible -

javascript - Get parameter of GET request -