CodeIgniter Forums
dynamic form_dropdown() - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: dynamic form_dropdown() (/showthread.php?tid=51446)

Pages: 1 2


dynamic form_dropdown() - El Forum - 05-04-2012

[eluser]selftaught[/eluser]
complete controller:
Code:
<?php

class Site extends CI_Controller {
    
    public function index()
    {
        $data['main_content'] = 'index';
        $this->load->view('template',$data);
    }
    
    function about_us()
    {
        $data['main_content'] = 'about_us';
        $this->load->view('template',$data);        
    }
        
    function trx_form()
    {
        $data['main_content'] = 'trx_form';
        //$this->load->view('template',$data);
        
        $this->load->model('trx_model');
        
        $data['query'] = $this->trx_model->get_markets();
        $this->load->view('template',$data,'trx_form',$data);
        
        //var_dump($data);
        //exit;
    }
}