Codeiniter After Delete Record Still Show in a Page
<p>When i delete or update the record and it has been deleted in database but still show when i click on the where the record show page(by anchor) but when i refresh this page(by f5) deleted record not show.
Problem is that i don't want to show deleted record on the page by anchor not need f5 pressing for refresh.</p>

<p>Show page by click on this link:</p>

<pre><code>&lt;li&gt;&lt;a href="&lt;?=site_url('admin_panel/portfolio_category')?&gt;"&gt;&lt;span class="side_icon ion-ios7-calendar-outline"&gt;&lt;/span&gt; Portfolio Categories&lt;/a&gt;&lt;/li&gt;
</code></pre>

<p>Following the functions are used:</p>

<pre><code>function portfolio_category($task="show",$extra=''){
        if($task=="show"){
$parent_catgs = $this-&gt;theartvalley_model-&gt;show_record("*","portfolio_category","desc");
if( $parent_catgs != false ){
    if(!empty($extra)) $data["status"] = $extra;
    $data["parent_categories"] = $parent_catgs;
    $this-&gt;admin_view("portfolio_category",$data);  
} else $this-&gt;admin_view("portfolio_category");
        }
else if($task=="delete"){   
            $this-&gt;theartvalley_model-&gt;delete_record($id,"portfolio_category");
            redirect(site_url('admin_panel/portfolio_category/show'), 'refresh');
            }   
    }
function show_record($select,$table,$order='asc'){
    $this-&gt;db-&gt;select($select);
    $this-&gt;db-&gt;order_by("id", $order); 
    $record = $this-&gt;db-&gt;get($table);
    if($record-&gt;num_rows() &gt; 0){
        $data = $record-&gt;result();
        return $data;
        }
    else return false;  
    }  
function delete_record($id,$table){
    $this-&gt;db-&gt;where('id', $id);
    $this-&gt;db-&gt;delete($table); 
        }  
</code></pre>