Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/82.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Html 从使用div而不是输入的窗体获取变量_Html_Forms_Variables_Button_Post - Fatal编程技术网

Html 从使用div而不是输入的窗体获取变量

Html 从使用div而不是输入的窗体获取变量,html,forms,variables,button,post,Html,Forms,Variables,Button,Post,这是我的表格: <form method="POST" action="configuration/raportare/generate_crangasi.php"> <div id="reportrange" name="reportrange" class="pull-right" style="background: #fff; cursor: pointer; padding: 5px 10px; border: 1px solid #ccc; width: 100%"

这是我的表格:

<form method="POST" action="configuration/raportare/generate_crangasi.php">
<div id="reportrange" name="reportrange" class="pull-right" style="background: #fff; cursor: pointer; padding: 5px 10px; border: 1px solid #ccc; width: 100%">
<i class="glyphicon glyphicon-calendar fa fa-calendar">
</i>&nbsp;<span></span> 
<b class="caret"></b>
</div><br>
<button type="submit">Generează raport</button>
</form>
我得到的错误是:

未定义的变量范围

我怎样才能解决这个问题

我将代码更改为:

<form method="POST" action="configuration/raportare/generate_crangasi.php">
<input type="text" name="reportrange" class="pull-right" style="background: #fff; cursor: pointer; padding: 5px 10px; border: 1px solid #ccc; width: 100%"/><br>
<input type="submit" value="Generează raport">
</form>

不再与输入一起工作的代码。(我在css中使用了这个符号)。

没有。必须是一个输入字段。你是对的。我改变了整个密码。非常感谢。您应该更改您的问题或在答案中添加修改后的代码:)我做了。谢谢。你想让PHP记录这个图标吗?有一种方法可以做到这一点。如果没有css,我如何将glyphicon集成到输入中d将整个过程转换为一个php变量。但我想问一下,让某人在表单中提交一个图标的目的是什么?图标只是为了纯粹的设计。所以它不是表单提交的一部分?但是,如果您将类转换为字符串,这是可能的。
<form method="POST" action="configuration/raportare/generate_crangasi.php">
<input type="text" name="reportrange" class="pull-right" style="background: #fff; cursor: pointer; padding: 5px 10px; border: 1px solid #ccc; width: 100%"/><br>
<input type="submit" value="Generează raport">
</form>
 <i class="glyphicon glyphicon-calendar fa fa-calendar">
    </i>&nbsp;<span></span> 
    <b class="caret"></b>