I’m new to Codeigniter, and I want redirect to a controller after the validation is fall:
if(!validate)
{
redirect('/poll/list');
}
but I need to pass a variable like $error to show the some error indication, but I don’t know how to pass the parameter to redirect method in the URL helper, and idea?
Use session flashdata – this is exactly what it is designed for:
Then inside your poll/list function: