I need that when loading the page the radio button is selected with the data of the database.
I need that when loading the page the radio button is selected with the data of the database.
To achieve what you need you must use the val () method
$("INPUT[name=nombre_del_radio]").val([valor_que_trae_tu_funcion]);
I hope you serve, greetings.
You can use the checked attribute.
<input type="radio" name="xxx" value="" checked />
o:
<input type="radio" name="xxx" value="" checked="checked" />