<form action="service.php" method="POST">
<fieldset>
<input type="button" name="getMa" onclick="window.open('service.php')"value="MA anzeigen"/>
<input type="text" size="5" maxlength="5" name="MA_ID" value=""/><br><br>
</fieldset>
service.php:
if(isset($_POST['getMa']))
{
echo "getMa gedrückt";
}
我只是想知道哪些按钮被按下了,我做错了什么?任何帮助表示赞赏,我对这些东西都是新手,大家好 问候 ISMIR
答案 0 :(得分:3)
删除onclick="window.open('service.php')"
,action
属性将提交表单。您基本上是直接打开一个窗口,因此它没有关于POST
参数
然后改变
type="button"
到
type="submit"