kuntulsu

Crud_Controller_Insert

Aug 4th, 2018
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.63 KB | None | 0 0
  1. <?php
  2. defined('BASEPATH') OR exit('no direct script has allowed');
  3.  
  4. class Welcome extends CI_Controller {
  5.  
  6.     function __construct(){
  7.         parent::__construct();
  8.         $this->load->model('m_data');
  9.         $this->load->helper('url');
  10.  
  11.     public function add(){
  12.         $this->load->view('add');
  13.     }
  14.  
  15.     public function adding(){
  16.  
  17.         $data = array(
  18.                 'nama'=>$this->input->post('nama'),
  19.                 'kelas'=>$this->input->post('kelas'),
  20.                 'jurusan'=>$this->input->post('jurusan'),
  21.                 'email'=>$this->input->post('email'),
  22.                 'website'=>$this->input->post('website'),
  23.                
  24.                
  25.                 );
  26.         $this->m_data->adding('data_siswa',$data);
  27.         redirect();
  28.     }
  29. ?>
Advertisement
Add Comment
Please, Sign In to add comment