• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
redirect()

#1
[eluser]NateL[/eluser]
Is it possible to pass a variable with the redirect function?

I have a function in my admin conroller called "insert()", which connects to a model and inserts the POST data.

Is it possible to generate a message variable and pass that in with the redirect?

for instance:
Code:
$message = "Your message was successfully entered!";
redirect('admin/', $message);

and in my view:
Code:
if (isset($message){
echo $message;
}

Or am I going about this the wrong way? Thanks Smile

#2
[eluser]The Wizard[/eluser]
hello, why not try this?

http://ellislab.com/codeigniter/user-gui...sions.html

nice signature btw Smile

#3
[eluser]NateL[/eluser]
[quote author="herrkaleun" date="1233613759"]hello, why not try this?

http://ellislab.com/codeigniter/user-gui...sions.html[/quote]
oh yeah! Flashdata %-P
Quote:nice signature btw Smile
Thanks Smile Anyone is free to steal it and use it as they wish :cheese:


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2019 MyBB Group.