Welcome Guest, Not a member yet? Register   Sign In
form_dropdown() always returns 0
#3

[eluser]EthanSP[/eluser]
[quote author="xwero" date="1212071956"]You are using an array for the dropdown name, the first argument only takes strings. I guess if you look at the source of your page you will see something like
Code:
<select name="Array">
[/quote]

I patterned my work with that of the CI User Guide's, which is:
form_dropdown('shirts', $options, 'large');

where,

I replaced:
'shirts' w/ a variable ($fby),
$options w/ another variable/array ($fby_values), and
'large' w/ yet another variable ($fby_default).

And looking at my source code, I didn't use <select name="Array">, instead:

function show_years() {
for ($x=date('Y')-150; $x<=date('Y'); $x++)
$years[] = $x;
return $years;
}


Messages In This Thread
form_dropdown() always returns 0 - by El Forum - 05-29-2008, 02:57 AM
form_dropdown() always returns 0 - by El Forum - 05-29-2008, 03:39 AM
form_dropdown() always returns 0 - by El Forum - 05-29-2008, 04:05 AM
form_dropdown() always returns 0 - by El Forum - 05-29-2008, 04:12 AM
form_dropdown() always returns 0 - by El Forum - 05-29-2008, 09:10 PM
form_dropdown() always returns 0 - by El Forum - 05-30-2008, 04:13 AM
form_dropdown() always returns 0 - by El Forum - 06-03-2008, 12:43 AM



Theme © iAndrew 2016 - Forum software by © MyBB