Welcome Guest, Not a member yet? Register   Sign In
how get validate data&
#1

[eluser]Unknown[/eluser]
controller
Code:
class Place extends CI_Controller
{

public function index()
{
  $this->load->view('index');
}

public function create()
{
  $this->load->library('form_validation');
  
  $this->form_validation->set_rules(array(
      array(
          'field' => 'ptitle',
       'label' => 'Place Title',
    'rules' => 'htmlspecialchars|trim|xss_clean|required|min_length[3]|max_length[150]'
   ),
    array(
          'field' => 'pdescription',
       'label' => 'Place Description',
    'rules' => 'required|xss_clean|xss_clean'
   ),
  ));

  if ($this->form_validation->run() == FALSE)
  {        
                                  // VALIDATION POST
   $form = 'form';
  }
  else
  {
   $form = 'succes_form';
  }
  
  $this->load->view('createplace', array('form' => $form));
}
}
after check post and validation? how i can get this valid data?




Theme © iAndrew 2016 - Forum software by © MyBB