PHP: How to get name value in <form name="form1" />
Is there a way to get the value of the name attribute in the form tag? I'm using PHP and 开发者_如何学JAVAdon't see it in $_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.
No, the form's name attribute is never set to sent to the server as part of the POST data.
The easiest way around this would be adding a hidden form element <input type="hidden">
containing the name.
<form name="myform" method="post" action="" enctype="multipart/form-data">
<input type="hidden" name="frmname" value=""/>
</form>
<form name="wut">
<input type="hidden" name="name" value="wut"/>
</form>
精彩评论