I have 4 submit buttons in a form… each named “Submit” with the values “North”, “South”, “East”, and “West”. When a button is submitted it sends its value to a php script that determines which direction was clicked… this in turn moves a character around a map. Everything works flawlessly when a button is clicked…..
However….
In the game clicking a direction gets repetative. I want to assign each button a key on the keyboard… so when that key is pressed it submits a value…. for example…
“W” key is hit on the keyboard… the value “North” is submitted… or up/down/left/right…. say.. the “UP” key is hit, the value “North” is sent…
My php code is pretty much irrelavent… but basically what im asking is how to submit a specific button when a certain key is pressed…. is this even possible. I’d also take suggestions on better ways to do it…
btw.. if it helps the variables should be passed using POST method