在PHP按钮帮助 [英] help in php button
本文介绍了在PHP按钮帮助的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有这个按钮
<input type="button" name="continue" id="continue" value="Continue">
在PHP中,我们使用,如果($ _ POST ['继续'])编辑提交按钮的作用,但只有当它的类型是提交。如果它的类型是什么按钮?我怎么可以编辑按钮的操作?
in php we use if($_POST['continue']) to edit the action of the submit button but only if its type is "submit". what if its type is "button"? how can i edit the action of that button?
推荐答案
如果按钮的类型是按钮
,而不是提交
,你会需要另一个按钮提交表单。考虑这个问题:
If the type of the button is "button
" instead of "submit
", you will need another button to submit the form. consider this:
<input type="hidden" name="continue" id="continue" value="Continue" />
<input type="submit" name="go" id="go" value="Next" />
在这种方式,你可以修改的值 $ _ POST ['继续']
在不影响用户界面(UI)。
In that way, you can modify the value of the $_POST['continue']
without affecting the User Interface (UI).
这篇关于在PHP按钮帮助的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文