我想将它们格式化为表单中的按钮。
<p><a href="<?=$_SERVER['PHP_SELF'] . "?action=moveForward" ?>">forward</a></p>
<p><a href="<?=$_SERVER['PHP_SELF'] . "?action=moveBackward" ?>">backward</a></p>
<p><a href="<?=$_SERVER['PHP_SELF'] . "?action=moveLeft" ?>">left</a></p>
<p><a href="<?=$_SERVER['PHP_SELF'] . "?action=moveRight" ?>">right</a></p>
像这样的东西...
<form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="GET">
<input type="submit" name="moveForward" value="forward">
<input type="submit" name="moveBack" value="back">
<input type="submit" name="moveLeft" value="left">
<input type="submit" name="moveRight" value="right">
</form>