全部。
我的Codeigniter有一个输入type="text"和一个文本区域。在发送时,我已经看到(Chrome网络源(,$_POST数组不包括inputtype="text"字段,但包括textarea!我甚至尝试将输入更改为文本区域,结果成功了。。。
<form action="news_save" method="post" accept-charset="utf-8">
<label class="control-label span3" for="subj">Subject</label>
<input type="text" id="subj" name-"subj" class="row-fluid">
<label class="control-label span3" for="body">Body</label>
<textarea rows="3" name="body" class="row-fluid" id="body"></textarea>
<button type="submit" class="btn btn-primary">Save</button>
</form>
有什么建议吗?
名称属性附近的输入文本有问题,而不是-应该是=
<input type="text" id="subj" name-"subj" class="row-fluid">
把它改成这个
<input type="text" id="subj" name="subj" class="row-fluid">
$array= array(namedb' => $this->input->post('body'));
以及插入数据库之后。
$this->ModelFile->MetodModel($array);