Advertisement
Guest User

Untitled

a guest
Oct 27th, 2016
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.36 KB | None | 0 0
  1. function index()
  2. {
  3. //set validation rules
  4. $this->form_validation->set_rules('name', 'First Name', 'trim|required|alpha|min_length[3]|max_length[30]|xss_clean');
  5. $this->form_validation->set_rules('prenom', 'Last Name', 'trim|required|alpha|min_length[3]|max_length[30]|xss_clean');
  6. $this->form_validation->set_rules('email', 'Email ID', 'trim|required|valid_email|is_unique[teacher.email]');
  7. $this->form_validation->set_rules('password', 'Password', 'trim|required|matches[cpassword]|md5');
  8. $this->form_validation->set_rules('cpassword', 'Confirm Password', 'trim|required|md5');
  9.  
  10. //validate form input
  11. if ($this->form_validation->run() == FALSE)
  12. {
  13. // fails
  14. $this->load->view('backend/user_registration_view');
  15. }
  16.  
  17. <div class="panel-body">
  18. <?php $attributes = array("name" => "registrationform");
  19. echo form_open("user/register", $attributes);?>
  20. <div class="form-group">
  21. <label for="name">First Name</label>
  22. <input class="form-control" name="name" placeholder="Your First Name" type="text" value="<?php echo set_value('name'); ?>" />
  23. <span class="text-danger"><?php echo form_error('fname'); ?></span>
  24. </div>
  25.  
  26. http://prof.skolarie.com/index.php/user/index
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement