title: Show form success after submit in CodeIgniter
body: <p>My error messages works well, but I do not know how to output success message NOT in a session's flash data. </p>
  
  <pre><code>&lt;div class="tpl-callbacks" id="tpl-callback"&gt;
      &lt;?php
          if( $this-&gt;session-&gt;flashdata('message') )
              $message = $this-&gt;session-&gt;flashdata('message');
          if( $this-&gt;session-&gt;flashdata('error') )
              $error = $this-&gt;session-&gt;flashdata('error');
          if( $this-&gt;session-&gt;flashdata('success'))
              $success = $this-&gt;session-&gt;flashdata('success');
          // THIS WORKS WITHOUT FLASHDATA
          if(function_exists('validation_errors') &amp;&amp; validation_errors() != '')
              $error = validation_errors();
          // AND HOW TO DO THE SAME BUT FOR SUCCESS AND WITHOUT FLASHDATA ?
      ?&gt;
      &lt;?php if( !empty($error) ):?&gt;
          &lt;div class="alert alert-error"&gt;
              &lt;a class="close" data-dismiss="alert"&gt;&amp;times;&lt;/a&gt;
              &lt;?php echo $error;?&gt;
          &lt;/div&gt;
      &lt;?php endif;?&gt;
      &lt;?php if( !empty($success) ):?&gt;
          &lt;div class="alert alert-success"&gt;
              &lt;a class="close" data-dismiss="alert"&gt;&amp;times;&lt;/a&gt;
              &lt;?php echo $success;?&gt;
          &lt;/div&gt;
      &lt;?php endif;?&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>So whenever I do a form check after submit, i can output errors message and success message in flashdata, but I do not know how to show a success message without using the flashdata:</p>
  
  <pre><code>if($this-&gt;form_validation-&gt;run() == FALSE){
      // $this-&gt;session-&gt;set_flashdata('error', validation_errors()); // &lt;-- THIS WORKS IN FLASHDATA
      validation_errors(); &lt;-- THIS WORKS BUT WITHOUT FLASHDATA, WHICH IS GOOD ALSO
  }else{
      // Set the callback message
      $this-&gt;session-&gt;set_flashdata('success', 'Success!'); // &lt;-- THIS WORKS IN FLASHDATA
      // AND HOW I SHOULD DO THE SAME, BUT WITHOUT FLASHDATA ?
      // SO IT WILL WORK WITH MY MAIN TEMPLATE.PHP
  
  }
  </code></pre>
  
  <p>Could someone point me out to the correct answer, or give me a tips what to checkout to achieve this ?</p>
  
  <p>Thank you</p>