Welcome Guest, Not a member yet? Register   Sign In
Dropdown showing problem after submit
#1

[eluser]phparif[/eluser]
1st)In the CI :
<select name="myselect">
<option value="small" &lt;?php echo set_select('myselect', 'small'); ?&gt; >Small Shirt</option>
<option value="med" &lt;?php echo set_select('myselect', 'med'); ?&gt; >Medium Shirt</option>
<option value="large" &lt;?php echo set_select('myselect', 'large',TRUE); ?&gt; >Large Shirt</option>
</select>
if an error occured, it return the value that i select before submit. But
2nd)&lt;?php
$options = array(
'small' => 'Small Shirt',
'med' => 'Medium Shirt',
'large' => 'Large Shirt',
);
echo form_dropdown('myselect', $options, 'large');
?&gt;
it is not return value that i select before submit. It return its default value 'Large Shirt'.
Now, How can i get dropdown value, that i select before submit by the 2nd process, as like 1st process.




Theme © iAndrew 2016 - Forum software by © MyBB