How to set the value for Radio Buttons When edit?

后端 未结 6 1786
忘了有多久
忘了有多久 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:28

    just add 'checked="checked"' in the correct radio button that you would like it to be default on. As example you could use php quick if notation to add that in:

    >Male
    >Female
    

    in this example $isMale & $isFemale is boolean values that you assign based on the value from your database.

提交回复
热议问题