[eluser]boltsabre[/eluser]
You should do it like this:
1. Load controller/view which has your form.
2. User submits form and posts back to your controller
3. If validation fails, it posts back again. Repeat 2.
4. If validation passes, do everything you need to do with your $_POST array (ie, update DB via a model, set session stuff etc). Once finished, set your flashdata "confirmation messgae".
5. Redirect to a new controller to "activate" your flash, and display it to your user (this new controller can still display the same view as your controller in step 1, it doesn't matter. If it does, and the user submits the form again, the form will post back to your step 1 controller, starting the whole process again).
Code:
// controller
public function pages (){
// all your stuff here
// at the end, once you've finished with your post stuff, set your flash and redirect
redirect('pages_confirmed');
}
public function pages_confirmed(){
$this->load->view('.....');
}