如何从表单数据获取数组

时间:2018-07-03 09:24:46

标签: php post metronic

我在我们的项目中正在使用Metronic Form Repeater。

我的表单标签没有任何加密或内容类型。

<form class="m-form" action="<?php echo $action; ?>" method='POST'></form>

提交表单时,我可以看到如下数据 enter image description here

不幸的是,当我打印$ _POST时,看到一个空数组。

表格代码

<div class="form-group  m-form__group row" id="m_repeater_1">
    <div data-repeater-list="" class="col-lg-12">
        <div data-repeater-item class="form-group m-form__group row align-items-center">
            <div class="col-md-3">
                <div class="m-form__group m-form__group--inline">
                    <div class="m-form__label">
                        <label>Column Name</label>
                    </div>
                    <div class="m-form__control">
                        <input type="name" name="col_name" class="form-control m-input" placeholder="Enter full name">
                    </div>
                </div>
                <div class="d-md-none m--margin-bottom-10"></div>
            </div>
            <div class="col-md-4">
                <div class="m-form__group m-form__group--inline">
                    <div class="form-group m-form__group row">
                        <label class="col-form-label col-lg-3 col-sm-12">Data Type</label>
                        <div class="col-lg-6 col-md-9 col-sm-6">
                            <select class="form-control m-select2" id="m_select2_1" name="param">
                                <option value='TINYINT'>TINYINT</option>
                                <option value='SMALLINT'>SMALLINT</option>
                                <option value='MEDIUMINT'>MEDIUMINT</option>
                            </select>
                        </div>
                    </div>
                </div>
                <div class="d-md-none m--margin-bottom-10"></div>
            </div>
            <div class="col-md-3">
                <div class="m-form__group m-form__group--inline">
                    <div class="m-form__label">
                        <label>Length</label>
                    </div>
                    <div class="m-form__control">
                        <input type="number" name="col_long" class="form-control m-input" placeholder="Uzunluk Giriniz">
                    </div>
                </div>
                <div class="d-md-none m--margin-bottom-10"></div>
            </div>
            <div class="form-group m-form__group col-md-3">
                <label for="exampleSelect1">Default</label>
                <select class="form-control m-input" id="exampleSelect1" name="col_def">
                    <option value='1'>NoDefault</option>
                    <option value='2'>NULL</option>
                    <option value='3'>CURRENT_TIMESTAMP</option>
                    <option value='4'>ON UPDATE CURRENT_TIMESTAMP</option>
                    <option value='5'>AUTO_INCREMENT</option>
                </select>
            </div>
        </div>
    </div>
</div>

0 个答案:

没有答案