Welcome Guest, Not a member yet? Register   Sign In
Flash_data problem

Hello everyone.

I have a form which gets data from the user. I use the CI validation function to validate if the user enters the correct data and I use flash_data to display errors right after validating the data inputted from the database. The CI validation works fine and I am only having a problem with flash_data. The question is, why does the user have to click the form twice in order to have the flash_data finally displayed?

if ($emailCheck != Null){
    echo $emailCheck[0]->email;
} else {
    $this->session->set_flashdata('resetMsg', 'Email not found in database.');

<?php if($this->session->flashdata('resetMsg')) : ?>
    <div class="error">&lt;?php echo $this->session->flashdata('resetMsg');?&gt;</div>
&lt;?php endif; ?&gt;

Thanks Smile

Messages In This Thread
Flash_data problem - by El Forum - 02-09-2010, 09:41 PM
Flash_data problem - by El Forum - 02-09-2010, 11:00 PM

Theme © iAndrew 2016 - Forum software by © MyBB