Welcome Guest, Not a member yet? Register   Sign In
Validation errors when using redirect instead of loading a view...
#1

[eluser]jay2003[/eluser]
Hi,

I am creating a small CMS and am giving the user the ability to add items such as contact form and login form etc to any page which means that for the validation errors I have to use a redirect instead of loading a view (and hence losing the validation errors and form contents errors during the redirect).

I have googled and it looks like i have to use flashdata but am unable to get it to work.

Does anyone have an example of this?

I have tried

Code:
$this->session->set_flashdata('errors', validation_errors());
redirect($redirect_to);

Where $redirect_to is the page the form was submitted from.

It is redirecting but losing the values and not showing an error.

I am pretty new to php and CI so any help would be much appreciated.

Thanks

Jason


Messages In This Thread
Validation errors when using redirect instead of loading a view... - by El Forum - 05-01-2012, 07:19 PM



Theme © iAndrew 2016 - Forum software by © MyBB