Skip to content

Instantly share code, notes, and snippets.

@erkurn
Forked from anonymous/data.php
Last active December 25, 2015 13:20
Show Gist options
  • Select an option

  • Save erkurn/cd2f2a151c29f5305659 to your computer and use it in GitHub Desktop.

Select an option

Save erkurn/cd2f2a151c29f5305659 to your computer and use it in GitHub Desktop.

Revisions

  1. erkurn revised this gist Dec 25, 2015. 3 changed files with 5 additions and 8 deletions.
    2 changes: 1 addition & 1 deletion data.php
    Original file line number Diff line number Diff line change
    @@ -8,7 +8,7 @@ public function __construct(){

    public function daftar(){

    $isi['semuadata'] = $this->m_daftar->_ambildata();
    $isi['semuadata'] = $this->m_daftar->ambildata();

    $this->load->view('template', $isi);

    8 changes: 3 additions & 5 deletions m_daftar.php
    Original file line number Diff line number Diff line change
    @@ -1,12 +1,10 @@
    <?php

    class m_daftar extends ci_model{
    class m_daftar extends CI_model{
    public function __construct(){

    }
    public function index(){

    parent::__construct();
    }

    public function ambildata(){
    $isi = array(
    'norek'=>'1994',
    3 changes: 1 addition & 2 deletions template.php
    Original file line number Diff line number Diff line change
    @@ -7,7 +7,6 @@
    <link rel="styilesheet" href="">
    </head>
    <body>
    <?php print_r(semuadata);
    ?>
    <?php print_r($semuadata); ?>
    </body>
    </html>
  2. @invalid-email-address Anonymous created this gist Dec 25, 2015.
    19 changes: 19 additions & 0 deletions data.php
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,19 @@
    <?php
    class data extends CI_controller{

    public function __construct(){
    parent::__construct();
    $this->load->model('m_daftar');
    }

    public function daftar(){

    $isi['semuadata'] = $this->m_daftar->_ambildata();

    $this->load->view('template', $isi);


    }

    }
    ?>
    20 changes: 20 additions & 0 deletions m_daftar.php
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,20 @@
    <?php

    class m_daftar extends ci_model{
    public function __construct(){

    }
    public function index(){

    }
    public function ambildata(){
    $isi = array(
    'norek'=>'1994',
    'nama'=>'rere',
    'alamat'=>'jatira',
    'saldo'=>'10000',
    );
    return $isi;
    }
    }
    ?>
    13 changes: 13 additions & 0 deletions template.php
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,13 @@
    <!DOCTYPE html>
    <html>
    <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>Judul</title>
    <link rel="styilesheet" href="">
    </head>
    <body>
    <?php print_r(semuadata);
    ?>
    </body>
    </html>