Created
September 19, 2016 02:17
-
-
Save sakukode/35a3e54a9c1ec18a3caa3fc625006ad8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
defined('BASEPATH') or exit('No direct script access allowed'); | |
class Welcome extends CI_Controller | |
{ | |
/* | |
* Method untuk meload view form | |
*/ | |
public function index() | |
{ | |
$this->load->view('welcome_message'); | |
} | |
/* | |
* Method untuk menghandle action ketika form disubmit | |
*/ | |
public function save() | |
{ | |
//mengembalikan (return) nilai atau variable status & message ke client side | |
echo json_encode(array('status'=> TRUE, 'message' => 'Form sudah diisi dengan lengkap dan benar')); | |
} | |
} | |
/* application/controllers/Welcome.php */ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment