[eluser]thbt[/eluser]
Here's how I ended up doing it.
Code:
if ( $this->form_validation->run() == FALSE || isset( $_POST['edit_listing'] ) )
{
// show form
}
else
{
// Data passed validation
if ( !isset( $_POST["really_write_to_db"] ) )
{
// Show the preview
}
else
{
// write to DB
}
}
So basically I have a preview page with a bunch of <INPUT TYPE="HIDDEN"...> tags to store the form data, plus a <INPUT TYPE="HIDDEN" NAME="really_write_to_db" VALUE=1> kind of thing to have the next submit really write to the database.
Nice thing about it is, the data gets validated every time it goes through this bit of code. Also, no need to write to the DB until the very end, which improves performance.
Hope this helps.