Form_Dropdown() help |
[eluser]Unknown[/eluser]
Hi, I've just started using codeIgniter afew days ago and am currently doing up a website based on videos and stuff therefore I'd want a drop box to be in place so that I'll be able to let users select the categories they want to view. This is the view code Code: <?= $state ?> And this is what I've placed in the controller file Code: function choice(){ So sorry to disturb, but I'm really confused over the Form_dropdown function >< .
[eluser]GSV Sleeper Service[/eluser]
ok, first of all read this page thoroughly, there's a perfect working example of how to use form_dropdown. http://ellislab.com/codeigniter/user-gui...elper.html you are passing $data to your view, but $data is empty. you need to change your controller slightly. Code: $data['options'] = array( I would advise against using redirect() in your views. The font tag was deprecated long ago, and comic sans?! are you insane?
[eluser]Unknown[/eluser]
Haha, was just playing around with fonts earlier on and decided it to be comic sans for now. Anyway thanks for the help and I'll try the code later at work |
Welcome Guest, Not a member yet? Register Sign In |