gpt4 book ai didi

php - PHP:如何在
中获取名称值

转载 作者:行者123 更新时间:2023-12-02 07:50:41 26 4
gpt4 key购买 nike

有没有一种方法可以在表单标签中获取name属性的值?我正在使用PHP,但在$ _POST中看不到它。

最佳答案

Is there a way to get the value of the name attribute in the form tag? I'm using PHP and don't see it in $_POST.



不,表单的名称属性永远不会设置为作为POST数据的一部分发送到服务器。

解决此问题的最简单方法是添加一个包含名称的隐藏表单元素 <input type="hidden">
<form name="myform" method="post" action="" enctype="multipart/form-data">
<input type="hidden" name="frmname" value=""/>
</form>

关于php - PHP:如何在<form name =“form1”/>中获取名称值,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4003300/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com