[eluser]Mareshal[/eluser]
flashdata(CI) == SESSIONS(PHP) right?
I have a functional version with cookies(but some clients maybe won't accept cookies).
1. Cookie is set inside this: $this->newsletter->add($email);
2. redirect(base_url());
3.
Code:
if(get_cookie('subscriber', TRUE)) {
echo "Thank you. You have been subscribed to our newsletter";
delete_cookie('subscriber');
}
This is the working version, but I tought there is another to do this.
but as far as I know sessions are safer than cookies. anyway, I don't use cookie to keep database details.
EDIT: I found another way, but I don't know how safe is this. I am working with controller only to load models. Then from models I load the view, because is easier to work with functions inside models, than controllers. Is there necessary to load a view ONLY from controllers? Is it safer than loading from models?