可以的,看代码吧:
name设置一致,根据value属性获得点击的是哪一个
<?php
header("Content-type: text/html; charset=utf-8");
if(isset($_POST['submit'])){
var_dump($_POST['submit']);
}
?>
<h1><?php echo $result;?></h1>
<form action="<?php echo $_SERVER['PHP_SELF']?>" method="post">
<p><input type="submit" name="submit" value="submit1"></p>
<p><input type="submit" name="submit" value="submit2"></p>
<p><input type="submit" name="submit" value="submit3"></p>
</form>
温馨提示:内容为网友见解,仅供参考