2013-12-08

I would like to update my database content and i need first to should back the last saved value to my user and allow him to update his data !!!
here is my code but it doesnt work !!!

labelEx($persons,'sex'); ?>
dropDownList($persons,'sex', array(''=>"Choose" ,"M"=>'Man', "F"=>'Woman'), array('options' => array($person_data['sex'] => array('selected'=>true)))); ?>
error($persons,'sex'); ?>

print_r($person_data['sex']) is showing me the right value from DB ('M' or 'F').

can any one show me how to do this please. i already check here but most of solution propose just show with a particular index but it's not working for me.

Show more