Posted By

mattstopa on 02/08/10


Tagged


Versions (?)

Code Igniter Validation 2 - Proper Version


 / Published in: PHP
 

  1. <?php
  2.  
  3. class Form extends Controller {
  4.  
  5. function index()
  6. {
  7. $this->load->helper(array('form', 'url'));
  8.  
  9. $this->load->library('validation');
  10.  
  11. if ($this->validation->run() == FALSE)
  12. {
  13. $this->load->view('myform');
  14. }
  15. else
  16. {
  17. $this->load->view('formsuccess');
  18. }
  19. }
  20. }
  21. ?>

Report this snippet  

You need to login to post a comment.