How to set the value for Radio Buttons When edit?

后端 未结 6 1779
忘了有多久
忘了有多久 2020-12-14 18:53

I have a Gender Row with radio buttons male & female. when i register as first time the values of radio button will store in database. Now my question is if i edit that

6条回答
  •  盖世英雄少女心
    2020-12-14 19:26

    When you populate your fields, you can check for the value:

    size="17">Male
     size="17">Female
    

    Assuming that the value you return from your database is in the variable $sex

    The checked property will preselect the value that match

提交回复
热议问题