How to select from the DB value and put them in But that one of the default is checked

 $ place = mysql_query ("SELECT place FROM place");
         while ($ pla = mysql_fetch_array ($ place)) {
         echo "". $ pla ['place']. "";
 }

If you do this, then you can choose all the meaning, but you need one and default. should have been checked

Here is my Html code

<div class="radio"> <div id="vibor"> <?php $place=mysql_query("SELECT place FROM place"); while($pla=mysql_fetch_array($place)){ echo "<label><input type='radio' value=".$pla['id']."/>".$pla['place']."</label>"; } ?> </div> </div> 
  • one
    mark the desired value. Show your html how you tried to do it yourself - Alex
  • yes, and to pull a category out of the database and to put one of them into default, nothing could be checked? When I choose and want to remove the check mark, it does not (( - As Lan
  • 1 - in the request you do not get the id , the request must be SELECT id, place FROM place , 2 - in the loop check $pla['id'] - if it is equal to the required, then in echo "..." write checked . - Alex

0