Help me solve my problem... I'm using Codeigniter Framework for a couple of days now and trying to do some exercise on how to fetch my database table data
here is my code:
Controller
public function view($page = 'login'){
if(!file_exists(APPPATH.'views/pages/'.$page.'.php')){
show_404();
}
$data['title'] = ucfirst($page);
$this->load->view('templates/header');
$this->load->view('pages/'.$page, $data);
$this->load->view('templates/footer');
}
//this is my main controller.
}
Model
Class Query_model extends CI_Controller{
//what to put here???
}
Views
<table class="table table-striped">
<thead>
<tr>
<th>Invoice Number</th>
<th>Name</th>
<th>Amount Due</th>
<th>Date</th>
<th>Due</th>
<th>Status</th>
<th>Actions</th>
</tr>
</thead>
<tbody>
<?php
//here i wanna display those data..
?>
</tbody>