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

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:
$message = "Your message was successfully entered!";
redirect('admin/', $message);

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

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

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


nice signature btw Smile

[quote author="herrkaleun" date="1233613759"]hello, why not try this?

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-2020 MyBB Group.