List view in codeigniter

Page

In your controller,

registerview.php

<?php
class Registerview extends CI_Controller
{
public function __construct()
{
parent::__construct();
load->helper('url');
}
function customerview()
{
$this->load->model('registerview_model');
$data['query']=$this->registerview_model->customerview();
$this->load->view('advertising/register_view',$data);
}
}
?>

In your model,

registerview_model.php

<?php
class Registerview_model extends CI_model
{
function __construct()
{
parent::__construct();
}
function customerview()
{
db->select('*')->from('register')->get();
return $query->result();
}
}
?>

In your view,

register_view.php

ID Company Name Address Phone Number Contact Person Mobile Number Account Number Account Name Bank Swift Code IBan Currency
customer_id;?> company_name;?> address;?> phone_number;?> contact_person;?> mobile_number;?> account_number;?> account_name;?> bank;?> swift_code;?> internet_banking;?> currency;?> <a href="config->base_url(“Update_controller/show_customer_id/$row->customer_id”);?>”>edit <a href="config->base_url(“Delete_controller/delete_customer_id/$row->customer_id”);?>”>delete

Leave a comment