Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8803277
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T01:17:57+00:00 2026-06-14T01:17:57+00:00

i have 2 page, which contains delete some record, check out the first controller

  • 0

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

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T01:17:58+00:00Added an answer on June 14, 2026 at 1:17 am

    I may advice you to try to track session variable by adding in the view

    var_dump($this->session);
    

    You don’t seem to be something wrong but you may try to add this in the controller of material page

    function index()
    {
        $sukses=$this->session->flashdata('sukses');
        if(isset($sukses)
           $data['sukses']=$sukses;
    //load your view 
    }
    

    and in your view of course

    <div id="vmaterial">
                <p><h2>Menu Material</h2></p>
        <center><notif><?php echo $sukses; ?></notif></center>
    

    It’s strange issue for sure but you may give this a try and waiting for your feedback

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this html page which is very simple, it contains a text box
I have a form on my page which contains two select dropdowns. The first
I have a page which contains a html.RenderPartial, that renders an ASP.NET MVC partial
I have a page which contains a jQuery-UI horizontal slider, created using a little
I have a page which contains profiles of various members of a company and
I have a page which contains a dynamically generated grid, where a user can
I have a child page LoginContent.aspx which contains a login form. If the user
I have an html page called search.html which contains sliders, they work perfectly in
I have read the page in Emacs wiki which contains a list of session
I have one drop down list in my page, which contains two options. What

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.