I want to pass $data
from the controller named poll
to the results_view
however I am getting an undefined variable error.
If you pass
$data = your code
$this->load->view('your-page', $data);
and get data on your view as
It won't work because ci didn't understand this patern. If like to pass value form controller to view so you can try this -
controller -
$data['any-name'] = your values;
$this->load->view('your-page', $data);
then in your view you can get this data by -
Hope this helps you.