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 8403551
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T22:22:26+00:00 2026-06-09T22:22:26+00:00

I’ve been trying to figure out how to use those flashdatas. I remember having

  • 0

I’ve been trying to figure out how to use those flashdatas.
I remember having difficulties last time, and this time again, it seems that I forget something.

So basically, I’m trying to set up a flasherror somewhere :

if(!$this->paypal_pro->APICallSuccessful($PayPalResult['ACK']))
  {
       $this->session->set_flashdata('flashError',  
           array('Errors'=>$PayPalResult['ERRORS']));
       redirect('main/form');
  } 

And in my main/form I got :

function Form()
 {
// Process validation form
 if ($this->form_validation->run() == FALSE)
 {
      //IF the validation process hasn't been run or there are validation errors
       $this->parser->parse('template/template', $data);
 } 

And in that view, I’m trying to get that flashError :

<?php if($this->session->flashdata('flashError')):?>
  <div class='flashError'>
 <?php  
  $flashError=$this->session->flashdata('flashError');
  foreach( $flashError['Errors'] as $Error) {
     echo $Error['L_SHORTMESSAGE'].' ('.$Error['L_ERRORCODE'].'):';
     echo '<br/>';
     echo $Error['L_LONGMESSAGE'];
  }
 ?>
  </div>
 <?php endif?> 

I don’t have anything in that variable, and when I try to var_dump it, It returns me false.

Can someone explain me how to use it despite the official documentation saying “will only be available for the next server request, and are then automatically cleared”

  • 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-09T22:22:27+00:00Added an answer on June 9, 2026 at 10:22 pm

    From Codeigniters documentation:

    If you find that you need to preserve a flashdata variable through an
    additional request, you can do so using the keep_flashdata() function.

    $this->session->keep_flashdata('item');
    

    UPDATE:

    Problem seems to be here:

    $this->session->set_flashdata('flashError',  
               array('Errors'=>$PayPalResult['ERRORS']));
    

    Try this one:

    $this->session->set_flashdata(array('Errors'=>$PayPalResult['ERRORS']));
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've been trying to figure out how to use google chart-wrapper with my django
I have been trying to figure out why and how to use performSelector. I
I have been trying to figure out why I am getting this problem and
I've been trying to figure out how to do this all afternoon, but can't
I've been trying to figure out how to do this, and was thinking it
I have been trying to figure out whats wrong for quite long time yet
I been sending countless days trying to figure this out from multiple code sources.
I've been trying to figure out how to use jsonp in my situation, but
I've been trying to figure this out for a while, and I just can't.
I've been trying to figure out how to do this. For some reason when

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.