Codeigniter Form Validation - how to unset form values after success?
Posted
by BrynJ
on Stack Overflow
See other posts from Stack Overflow
or by BrynJ
Published on 2010-05-10T10:57:23Z
Indexed on
2010/05/10
11:04 UTC
Read the original article
Hit count: 228
I realise this request goes against the example provided in the CI documentation (which advises a separate 'success' page view), but I would like to reutilise a given form view after a form has been successfully submitted - displaying a success message then displaying a blank form. I've tried a few ways unsuccessfully to clear the validation set values (unsetting $_POST, setting rules / fields to an empty array and rerunning validatio).
I could redirect to the same page, but then I'd have to set a session variable to display a success message - which is a messy approach.
Any ideas how to achieve the above?
© Stack Overflow or respective owner