Welcome Guest, Not a member yet? Register   Sign In
displaying data in a form field
#3

[eluser]elmne[/eluser]
Thanks,

How then do i get the default value in a dropdown box to be displayed?

Is this correct?

Code:
<select name="select"   value="&lt;?php echo set_value('customer_type',"$row->customer_type"); ?&gt;" >
       <option>*************</option>
       <option value="active">Active</option>
       <option value="inactive">Inactive</option>
</select>

The value in the database table may be NULL.

So the set value needs to either set the default;

- active
- inactive
- NULL (empty)

How do i set the default drop down value
and if it's NULL, how do i reflect that in the drop down by not having anything selected/set ?


Messages In This Thread
displaying data in a form field - by El Forum - 05-17-2010, 02:37 PM
displaying data in a form field - by El Forum - 05-17-2010, 03:33 PM
displaying data in a form field - by El Forum - 05-17-2010, 06:12 PM



Theme © iAndrew 2016 - Forum software by © MyBB