Php 如何使用CodeIgniter实现表单成功通知?
我对CodeIgniter 2上创建的非ajax表单有反馈。我想在表单成功提交后显示notify。如何正确地做到这一点?基本示例,这一点过于简化,因此易于理解: 控制器Php 如何使用CodeIgniter实现表单成功通知?,php,codeigniter,Php,Codeigniter,我对CodeIgniter 2上创建的非ajax表单有反馈。我想在表单成功提交后显示notify。如何正确地做到这一点?基本示例,这一点过于简化,因此易于理解: 控制器 if ($this->form_validation->run()) // Your logic that tells if the submit was OK { $data['message'] = 'Thanks.'; } else { $data['message'] = 'There was
if ($this->form_validation->run()) // Your logic that tells if the submit was OK
{
$data['message'] = 'Thanks.';
}
else
{
$data['message'] = 'There was an error.';
}
$this->load->view('my_view', $data);
看法
我不想给你一个固定的答复,但你试过什么?
<?php echo $message; ?>