Welcome Guest, Not a member yet? Register   Sign In
Redirect while passing data
#2

[eluser]CroNiX[/eluser]
Do you actually need to redirect? It's the same controller so you should just be able to call that method.
instead of
Code:
redirect('/leads/success', 'location');
try
Code:
$this->success();
and change the other one too

As far as accessing that data in the failure method...
do it as you basically showed
instead of
Code:
echo "Failure";
try
Code:
echo $this->data['displayMessages'];

But you obviously can't do that using a redirect as you lose the contents of $this->data, unless you reload it somehow (or stick it in a session variable which you then can read in the failure() method).

You don't have to worry about that though if you did it as I showed you as you never leave the controller so all data should still exist.


Messages In This Thread
Redirect while passing data - by El Forum - 09-18-2012, 12:18 PM
Redirect while passing data - by El Forum - 09-18-2012, 01:11 PM
Redirect while passing data - by El Forum - 09-18-2012, 01:17 PM
Redirect while passing data - by El Forum - 09-18-2012, 01:22 PM
Redirect while passing data - by El Forum - 09-18-2012, 06:57 PM



Theme © iAndrew 2016 - Forum software by © MyBB