i have 2 page, which contains delete some record, check out the first controller to delete
function delete($idnya)
{
$this->m_kategorimaterial->delete($idnya);
$this->session->set_flashdata('sukses','Hapus kategori material berhasil');
redirect('c_kategorimaterial');
}
then loaded on view
<div id="vkategorimaterial">
<p><h2>Menu Kategori Material</h2></p>
<center><notif><?php echo $this ->session->flashdata('sukses'); ?></notif></center>
and it works like i need. but then its not working on the other controller
function delete($idnya)
{
$this->m_material->delete($idnya);
$this->session->set_flashdata('sukses','Hapus material berhasil');
redirect('c_material');
}
and here is the views of material
<div id="vmaterial">
<p><h2>Menu Material</h2></p>
<center><notif><?php echo $this->session->flashdata('sukses'); ?></notif></center>
why does the flashdata is not showing on material page ? but it works on kategorimaterial page ? FYI, first, i make the
$this->session->set_flashdata('sukses','Hapus kategori material berhasil');
on the kategorimaterial page, once it works, i copy the
$this->session->set_flashdata('sukses','Hapus kategori material berhasil');
into material controller then change the value. and its not working. how do i resolve this ?
<notif> tag needed due to css styling make green color on every flashdata message
I may advice you to try to track session variable by adding in the view
You don’t seem to be something wrong but you may try to add this in the controller of material page
and in your view of course
It’s strange issue for sure but you may give this a try and waiting for your feedback