What is the standard way to provide a set of different options available for clicks, all of which represent the same form?
I have a page with PHP that displays some data about a set of movies. The page is refreshed using POST. The form displays only movies starting with a specific letter. I want to present a set of interactive options at the top of the screen, each of which is a letter. So if you hit "B" it will submit the form and re-draw the page showing only movies that start with B. (I know Ajax would be the best way to do this, but I'm trying to do something quickly).
Anyway, I know I can do this if each link is a Javascript call that sets the value of a hidden field and then submits the form, or I could do it by having each letter that has a specific meaning and submits the form directly but none of them strike me as particularly elegant. Is there a standard way to do this? Am I missing something really obvious?
source to share
You can always create multiple submit buttons and give each a different name. Then you test to see which request was clicked, depending on what's included in the POST array.
Note that instead of the input type, enter the image input type so that you can replace your own image, etc. for your button.
source to share