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
Post a Comment