mercredi 28 novembre 2018

change value of a radio button based on database value in php

i have a radio button in my form

<input type="radio" id="radio-2" name="radio" checked  onclick="calculate()" >

how to set the radio button value based on database value like

if(db_val==2){
value=50
} else{
value=100
}

Aucun commentaire:

Enregistrer un commentaire