• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
set_select problem in setting default values from db

#1
[eluser]Jygz V[/eluser]
Hi,

Good day.

I am new to CI, I was confused on how to set default values of a dropdown using the "set_select".

This is the scenario.

I have a page with the following dropdown:
<select name='gender'>
<option name='male'>Male</option>
<option name='female'>Female</option>
</select>

And when this page is loaded, I get the gender from the database based from the user's profile. The gender drop down will be set to default depending on what gender is retrieved from the database. Can anybody show me how to do that using "set_select"?

Thanks.


Messages In This Thread
set_select problem in setting default values from db - by El Forum - 02-02-2009, 06:26 PM
set_select problem in setting default values from db - by El Forum - 02-02-2009, 07:29 PM
set_select problem in setting default values from db - by El Forum - 02-02-2009, 08:36 PM
set_select problem in setting default values from db - by El Forum - 02-03-2009, 05:22 AM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2019 MyBB Group.