[eluser]rijobo[/eluser]
Hello,
I would like to create a dropdown list from my database, but i get the error:
A PHP Error was encountered
Severity: Notice
Message: Undefined variable: soort
Filename: views/product_toevoegen.php
Line Number: 54
What do I do wrong?
This is what I do:
In my controller:
Code:
$soort = $this->Productupload->SelectieSoort();
$this->load->view('product_toevoegen', $soort);
My model:
Code:
function SelectieSoort(){
$this->db->select('soort');
$soort = $this->db->get('soort');
return $soort;
}
My view (form):
Code:
<h5>Soortlijst</h5>
<?php echo form_dropdown('soort', $soort, ''); ?>