Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/codeigniter/3.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
Php <;按钮类型=";按钮“&燃气轮机;它不起作用。它不';不要发布数据_Php_Codeigniter_Bootstrap 4 - Fatal编程技术网

Php <;按钮类型=";按钮“&燃气轮机;它不起作用。它不';不要发布数据

Php <;按钮类型=";按钮“&燃气轮机;它不起作用。它不';不要发布数据,php,codeigniter,bootstrap-4,Php,Codeigniter,Bootstrap 4,我试图从post方法中的日期选择器获取值。要选择日期,我需要在选择日期后通过按钮进行选择,以在post方法中获取其值。当单击“提交”按钮时,它不会获取任何值。它的值为空 查看 <div class="form-group"> <label>Date range button:</label> <div class="input-group"> <butto

我试图从post方法中的日期选择器获取值。要选择日期,我需要在选择日期后通过按钮进行选择,以在post方法中获取其值。当单击“提交”按钮时,它不会获取任何值。它的值为空

查看

  <div class="form-group">
            <label>Date range button:</label>
              <div class="input-group">
                <button type="button" class="btn btn-default pull-right" name="jamil" id="daterange-btn">
                  <span>
                    <i class="fa fa-calendar"></i> Date range picker
                  </span>
                    <i class="fa fa-caret-down"></i>
                </button>
              </div>
          </div>
<input type="submit" name="show" id="show"  class="btn btn-primary" value="show">

您需要将所有HTML包装在
表单
标记中

您可以使用
bootstrap datepciker

HTML视图

<form method="POST">
    <div class="form-group">
        <label>Date range button:</label>
        <div class="input-group">
            <input type="text" name="jamil" >
            <button type="button" class="btn btn-default pull-right" name="jamil" id="daterange-btn">
                <span>
          <i class="fa fa-calendar"></i> Date range picker
        </span>
                <i class="fa fa-caret-down"></i>
            </button>
        </div>
    </div>
    <div class="form-group">
        <input type="submit" name="show" id="show" class="btn btn-primary" value="show">
    </div>
</form>

您需要将所有HTML包装在
表单
标记中

您可以使用
bootstrap datepciker

HTML视图

<form method="POST">
    <div class="form-group">
        <label>Date range button:</label>
        <div class="input-group">
            <input type="text" name="jamil" >
            <button type="button" class="btn btn-default pull-right" name="jamil" id="daterange-btn">
                <span>
          <i class="fa fa-calendar"></i> Date range picker
        </span>
                <i class="fa fa-caret-down"></i>
            </button>
        </div>
    </div>
    <div class="form-group">
        <input type="submit" name="show" id="show" class="btn btn-primary" value="show">
    </div>
</form>

已经使用了did。它在其他字段上工作,如或其他类型,但不适用于我在模板中使用日期范围选择器插件,可以轻松地选择日期,并在那里像那样编码。我不能使用,或者插件不起作用。等你不用ajax就可以实现它,等我更新答案。使用这个库,你也可以通过
input
访问它。你已经使用了did。它在其他字段上工作,如或其他类型,但不适用于我在模板中使用日期范围选择器插件,可以轻松地选择日期,并在那里像那样编码。我不能使用,否则插件不起作用等一下,你可以不用ajax来实现它,等我的更新回答使用这个库,你也可以通过
input
$jam = $this->input->post('jamil'); // $_POST['test']
echo $jam;