Note that there are some explanatory texts on larger screens.

plurals
  1. POCodeigniter Flashdata Is Not Showing
    text
    copied!<p>i have 2 page, which contains <code>delete</code> some record, check out the first controller to delete</p> <pre><code>function delete($idnya) { $this-&gt;m_kategorimaterial-&gt;delete($idnya); $this-&gt;session-&gt;set_flashdata('sukses','Hapus kategori material berhasil'); redirect('c_kategorimaterial'); } </code></pre> <p>then loaded on view</p> <pre><code>&lt;div id="vkategorimaterial"&gt; &lt;p&gt;&lt;h2&gt;Menu Kategori Material&lt;/h2&gt;&lt;/p&gt; &lt;center&gt;&lt;notif&gt;&lt;?php echo $this -&gt;session-&gt;flashdata('sukses'); ?&gt;&lt;/notif&gt;&lt;/center&gt; </code></pre> <p>and it works like i need. but then its not working on the other controller</p> <pre><code>function delete($idnya) { $this-&gt;m_material-&gt;delete($idnya); $this-&gt;session-&gt;set_flashdata('sukses','Hapus material berhasil'); redirect('c_material'); } </code></pre> <p>and here is the views of <code>material</code> </p> <pre><code>&lt;div id="vmaterial"&gt; &lt;p&gt;&lt;h2&gt;Menu Material&lt;/h2&gt;&lt;/p&gt; &lt;center&gt;&lt;notif&gt;&lt;?php echo $this-&gt;session-&gt;flashdata('sukses'); ?&gt;&lt;/notif&gt;&lt;/center&gt; </code></pre> <p>why does the flashdata is not showing on <code>material</code> page ? but it works on <code>kategorimaterial</code> page ? FYI, first, i make the</p> <pre><code> $this-&gt;session-&gt;set_flashdata('sukses','Hapus kategori material berhasil'); </code></pre> <p>on the <code>kategorimaterial</code> page, once it works, i copy the </p> <pre><code> $this-&gt;session-&gt;set_flashdata('sukses','Hapus kategori material berhasil'); </code></pre> <p>into <code>material</code> controller then change the value. and its not working. how do i resolve this ? </p> <p><code>&lt;notif&gt;</code> tag needed due to css styling <em>make green color on every flashdata message</em></p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload