Welcome Guest, Not a member yet? Register   Sign In
Form drop_down problem
#1

[eluser]Michal1[/eluser]
Hello guys I trying to use dropdowns in a simple way and I am having problems with them.

I have a controller site and inside of function index I have:

Code:
$shirts_on_sale = array('small', 'large');
                    $this->load->view('admin_view',$shirts_on_sale);

then in admin_view I have

Code:
<?php echo form_dropdown('shirts', $shirts_on_sale, 'large'); ?>

But I receive an error

Code:
A PHP Error was encountered

Severity: Notice

Message: Undefined variable: shirts_on_sale

A PHP Error was encountered

Severity: Warning

Message: Invalid argument supplied for foreach()

Filename: helpers/form_helper.php

Line Number: 310

why is that? Thanks for any input


Messages In This Thread
Form drop_down problem - by El Forum - 08-01-2011, 12:14 PM
Form drop_down problem - by El Forum - 08-01-2011, 12:23 PM
Form drop_down problem - by El Forum - 08-01-2011, 12:26 PM
Form drop_down problem - by El Forum - 08-01-2011, 12:27 PM
Form drop_down problem - by El Forum - 08-01-2011, 12:30 PM
Form drop_down problem - by El Forum - 08-01-2011, 02:44 PM
Form drop_down problem - by El Forum - 08-01-2011, 05:56 PM
Form drop_down problem - by El Forum - 08-02-2011, 12:21 AM
Form drop_down problem - by El Forum - 08-02-2011, 03:48 AM
Form drop_down problem - by El Forum - 08-02-2011, 03:53 AM



Theme © iAndrew 2016 - Forum software by © MyBB