我有这种形式的工作,说实话我无法弄清楚我可能做了什么。表单现在不会提交,我也没有看到任何表单验证错误。Codeigniter表单验证不提交表单,没有错误
控制器:
$this->load->library('form_validation');
$this->form_validation->set_error_delimiters('<div class="ncerror" >', '</div>');
$this->form_validation->set_rules('media_consent', 'Media Consent', 'required');
$this->form_validation->set_rules('aic_name', 'Name', 'required');
$this->form_validation->set_rules('aic_phone', 'Cell phone', 'required');
$this->form_validation->set_rules('aic_email', 'Email', 'required');
if ($this->form_validation->run() == FALSE) {
$data = $this->ncformdata();
$this->load->view('templates/sponsorheader', array('title' => 'National Convention Registration'));
var_export($_POST);
$this->load->view('ncform', $this->ncformdata());
$this->load->view('templates/footer2');
}
我
<?php echo "errors" . validation_errors();
在我的窗体的顶部。提交表单后,表单将重新加载显示的“错误”,但没有其他来自validation_errors函数的输出。任何帮助解决问题?