2014-06-23 14:11
浏览 65

Codeigniter form-> run()相当于form_validation-> run()?

I'm relatively new to CodeIgniter and this may be an obvious answer, but I am unable to find anything in the documentation.

I know how to use form_validation->run() to validate a form and run some code when it is submitted successfully. What if I wanted to do something with a form that did not require any sort of validation? Is there a form->run() equivalent that returns true when a user submits the form? Something like:


public function update($id)

        // do some stuff after user has submitted form


图片转代码服务由CSDN问答提供 功能建议

我对CodeIgniter相对较新,这可能是一个明显的答案,但我无法在 文档。

我知道如何使用 form_validation-> run()来验证表单并在成功提交时运行一些代码。 如果我想用不需要任何验证的表单做某事怎么办? 是否有 form-> run()等效,当用户提交表单时返回true? 类似于:


  public function update($ id)
  $ this-> load-> helper('form'); 
 if if($ this-> form-> run())
  • 写回答
  • 好问题 提建议
  • 追加酬金
  • 关注问题
  • 邀请回答

2条回答 默认 最新

相关推荐 更多相似问题