Welcome Guest, Not a member yet? Register   Sign In
Send message to a page.
#11

[eluser]Zack Kitzmiller[/eluser]
[quote author="CtheB" date="1260420282"]You don't need session's for this

If you redirect them to http://www.yourdomain.com/index.php/a/b/succes

In the method you will have the parameter of succes and here you can set the data to display like this:

Code:
<?php
class A extends Controller {

    function A()
    {
         parent::Controller();
    }

    function b($succes = FALSE)
    {
          if($succes == 'succes')
          {
              $data['succes'] = "You have succesfully filled out the form";
          }
          else
          {
              $data['succes'] = "";
          }

          $this->load->view('c', $data);
    }
}
?>
[/quote]

ehh. I feel like that's pretty gross. I usually use sessions, but I can never make flashdata work the way I expect so I just manually unset the session if it exists.
#12

[eluser]CtheB[/eluser]
it's indeed pretty gross, and i'm not doing it like this, but it is the easiest solution for this guy, after all he is just started with codeigniter for 2 weeks.
#13

[eluser]WebbHelp[/eluser]
Thanks for all replys!

What is the best way to do? Shall I use flashdata?
I want the best solution Smile
#14

[eluser]Mareshal[/eluser]
flashdata +1




Theme © iAndrew 2016 - Forum software by © MyBB