[eluser]hvalente13[/eluser]
Hi vlad_ci,
I guess that the older CI and forum users, would tell you to read more the user guide. I recommend that too, and if you notice it's one of the best user guides for this kind of software (framework).
But I give you a hint:
1. Use the models to retrieve all data you want from database. If you want, you may also build the html elements inside the model functions like selects and other tags.
2. Use the controllers to work that data according with the "state of the world".
Here you can make ifs and other conditions, controlling the uri->segments and POST variables, and pass the data to an array. You can reach the data by calling the model:
Code:
$data['example'] = $this->mymodel->getdata($this->uri->segment(3))
3. THIS YOU MIGHT WANT TO KNOW.
Here you put all your data with the names you gave previously in you controller array $data
And if you want to pass a new variable to the view just create it in your controller like this:
Code:
$data['var1'] = "My website rules";
Then you can put it in your view like this:
Code:
<div><?=$var1?></div>
Hope this helps!
Good luck