Creating a form dropdown from db - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Creating a form dropdown from db (/showthread.php?tid=27637) Pages:
1
2
|
Creating a form dropdown from db - El Forum - 02-17-2010 [eluser]laytone[/eluser] What Template parser are you using? How / where do you send data to your views? that drop down options array needs to be include in your load->view like this: Code: $pagedata['dropdownoptions'] = $this->your_model->your_get_list_function(); After this is done there is a variable called $dropdownoptions and a variable called $examplevar in your view. Creating a form dropdown from db - El Forum - 02-17-2010 [eluser]Bionicjoe[/eluser] Got all my template stuff from Simple Template Code: <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); Creating a form dropdown from db - El Forum - 02-17-2010 [eluser]laytone[/eluser] Everything looks good then.. make sure there is a $ in front of dropdownoptions Quote:Added code. Same issue. Creating a form dropdown from db - El Forum - 02-17-2010 [eluser]laytone[/eluser] Ok, here we go, I think I got it: Code: function addticket() I bet that works Creating a form dropdown from db - El Forum - 02-17-2010 [eluser]Bionicjoe[/eluser] Beautiful! You got it!! |