Advertisement
rodro1

Codeignitor Essential Function

Aug 29th, 2016
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.76 KB | None | 0 0
  1. // input form
  2. <?php echo form_input('name', set_value('name', $user->name)); ?>
  3. // input form get data
  4. <?php echo $this->input->post('name'); ?>
  5.  
  6. // rules from validation
  7. public $rules_admin = array(
  8.         'email' => array(
  9.             'field' => 'email',
  10.             'label' => 'Email',
  11.             'rules' => 'trim|required|valid_email|callback__unique_email|xss_clean'
  12.             ),
  13.         'name' => array(
  14.             'field' => 'name',
  15.             'label' => 'Name',
  16.             'rules' => 'required'
  17.             ),
  18.         'password' => array(
  19.             'field' => 'password',
  20.             'label' => 'Password',
  21.             'rules' => 'trim|required|matches[password_confirm]'),
  22.         'password_confirm' => array(
  23.             'field' => 'password_confirm',
  24.             'label' => 'Password Confirm',
  25.             'rules' => 'trim|required|matches[password]')
  26.         );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement