如何从php

时间:2018-04-17 02:18:27

标签: php

我有三个按钮,当我点击它们时,我希望在这里使用PHP获得价值'我的代码



<form action="" method="POST">
  <button name="apple" value="apple">apple</button>
  <button name="windows" value="windows">windows</button>
  <button name="linux" value="linux">linux</button>
</form>
&#13;
&#13;
&#13;

谢谢

1 个答案:

答案 0 :(得分:0)

你可以试试这个:

//for apple button or change to windows/linux if you want to get the other value
if (isset($_POST['apple'])) {
  echo $_POST['apple'];
}
相关问题