Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function index()
- {
- //set validation rules
- $this->form_validation->set_rules('name', 'First Name', 'trim|required|alpha|min_length[3]|max_length[30]|xss_clean');
- $this->form_validation->set_rules('prenom', 'Last Name', 'trim|required|alpha|min_length[3]|max_length[30]|xss_clean');
- $this->form_validation->set_rules('email', 'Email ID', 'trim|required|valid_email|is_unique[teacher.email]');
- $this->form_validation->set_rules('password', 'Password', 'trim|required|matches[cpassword]|md5');
- $this->form_validation->set_rules('cpassword', 'Confirm Password', 'trim|required|md5');
- //validate form input
- if ($this->form_validation->run() == FALSE)
- {
- // fails
- $this->load->view('backend/user_registration_view');
- }
- <div class="panel-body">
- <?php $attributes = array("name" => "registrationform");
- echo form_open("user/register", $attributes);?>
- <div class="form-group">
- <label for="name">First Name</label>
- <input class="form-control" name="name" placeholder="Your First Name" type="text" value="<?php echo set_value('name'); ?>" />
- <span class="text-danger"><?php echo form_error('fname'); ?></span>
- </div>
- http://prof.skolarie.com/index.php/user/index
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement