Codeigniter入门学习笔记14—表单的验证
- 很久很久以前学习Codeigniter的笔记记录,很随意,但都是自己记录的,希望对需要的人有所帮助。
- 本文使用word2013编辑并发布
- Postbird | There I am , in the world more exciting!
- Postbird personal website : http://www.ptbird.cn
表单验证
1、add_user
]
2、form_check()
3、
1、加载
$this->load->library('form_validation');
2、设置各种规则
$this->form_validation->set_rules('user_name','姓名','required');
$this->form_validation->set_rules('user_password','密码','required');
$this->form_validation->set_rules('user_email','邮箱','required');
3、 运行
$bool=$this->form_validation->run();
4、反馈错误信息
echo form_error('user_password');

浙公网安备 33010602011771号