<?php
if($_SERVER["REQUEST_METHOD"] == "POST") {
}
?>
<form action = "" method = "post">
<label>Name of fruit</label><br>
<input type = "text" name = "fruit" class = "box" placeholder="Enter Fruit"/><br><br>
<input type = "submit" value = " Submit "/><br>
</form>
<form action = "" method = "post">
<label>Name of pet</label><br>
<input type = "text" name = "pet" class = "box" placeholder="Enter Pet"/><br><br>
<input type = "submit" value = " Submit "/><br>
</form>
考虑我有两种形式,它们的行为不同。就像我在水果上点击提交一样,我期待的结果比从宠物表单提交的结果更多。通常,如果我有一个表单,我只使用上面的php if语句,但这不会与两个一起工作。
如果(_post [&#39; fruit&#39;]) - &gt; if(_post [&#39; pet&#39;]) - &gt;一些东西。
有这样的机制吗?
答案 0 :(得分:2)
您可以尝试使用ajax Call for this,并尝试按下按钮名称并按下按钮。
<ion-card>
<button ion-button (click)="startVideo()">Start Video</button>
</ion-card>