Advertisement
Guest User

Page.php

a guest
May 26th, 2017
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.38 KB | None | 0 0
  1. <?php
  2. class Page extends CI_Controller{
  3.  
  4.  
  5.   public function index(){
  6.     $this->load->view('form');
  7.   }
  8.     public function cek_validasi(){
  9.     $this->load->library('form_validation');
  10.    
  11.     $this->form_validation->set_rules('nama', 'nama', 'trim|required');
  12.     if ($this->form_validation->run() == FALSE) {
  13.       $this->index();
  14.     }else {
  15.       echo "data aman";
  16.     }
  17.     }
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement