Welcome Guest, Not a member yet? Register   Sign In
Sending user messages
#1

[eluser]iambaz[/eluser]
Hi,

I am redeveloping a CMS from my own framework into the codeigniter framework. At lots of points throughout the CMS, I need to send the user status messages, for example, when they add a new page, I need to tell the user 'Page added successfully' and other messages like this.

Generally these messages need to be displayed after a redirect, so for example if a new page form is submitted, the controller will be called, it will tell the model to save the data and then it will redirect the user to the previous page where a status message should be displayed.

I used to do it simply by sending it in the redirect url, for example

Code:
$model->save_data();
header("Location: http://www.mysite.com/pages.php?status=Pages added successfully");

The controller would pick this up via $_GET and post it in the template.

My question is what is the best method to achieve this in code igniter? Are there any libraries that might help or will I just have to send it as a URL segment?

Many Thanks


Messages In This Thread
Sending user messages - by El Forum - 08-24-2010, 10:09 AM
Sending user messages - by El Forum - 08-24-2010, 10:48 AM
Sending user messages - by El Forum - 08-24-2010, 10:51 AM
Sending user messages - by El Forum - 08-24-2010, 11:06 AM



Theme © iAndrew 2016 - Forum software by © MyBB