I am writing an application in CodeIgniter where I specify the
meta-tag on every page in every controller which I have managed to send to my header te
You may need to create some routes for your show function. Codeigniter URI Routing
$route['your_controller_name/show/(:any)'] = 'your_controller_name/show/$1';
I am not sure if you have set up a htaccess for your main directory so you could remove the index.php
from your url.
Try this code below
Model:
db->where('slug', $card);
$query = $this->db->get($this->db->dbprefix . 'creditcards');
if ($query->num_rows() > 0) {
$row = $quer->row();
return $row->title;
} else {
return false;
}
}
}
Controller: Your_controller_name.php
load->model('listing_model');
}
public function show($card) {
$data['title'] = $this->listing_model->get_card_title($card);
$this->load->view('includes/header', $data);
$this->load->view('listings/listing_card', $data);
$this->load->view('includes/footer');
}
}
View: