我想获取我的下拉列表数据我写了一个代码,但它无法正常工作

I tried this code to fetch my selected radio element but the result that i had is: the element of the radio that appears is not the selected elements

<div class="panel-body">

   <div class="radio"> 

      <div class="form-group">             
      <label><input type="radio" name="c5" value="a" <?php echo ($row['device_typ'] ) ? 'checked' : ''; ?> /> unité centrale  </label>
      </div>

      <div class="form-group">  
      <label><input type="radio" name="c5" value="b" <?php echo ($row['device_typ'] ) ? 'checked' : ''; ?>  /> écran  </label>
      </div>

      <div class="form-group">  
      <label><input type="radio" name="c5" value="c" <?php echo ($row['device_typ'] ) ? 'checked' : ''; ?>  /> clavier  </label>
      </div>

      <div class="form-group">  
      <label><input type="radio" name="c5" value="d" <?php echo ($row['device_typ'] ) ? 'checked' : ''; ?>  /> souris </label>
      </div>

      <div class="form-group">
      <label><input type="radio" name="c5" value="e" <?php echo ($row['device_typ'] ) ? 'checked' : ''; ?> /> équipement spéciale </label>

   </div>

</div>

you need to compare your database value against your input radio as below

<label><input type="radio" name="c5" value="a" <?php echo ($row['device_typ']=='a') ? 'checked' : ''; ?> /> unité centrale  </label>

You are not comparing each radio button values, for example

$row['device_typ'] = 'a';

Your code should be

 <div class="panel-body">

   <div class="radio"> 

  <div class="form-group">             
  <label><input type="radio" name="c5" value="a" <?php echo ($row['device_typ'] == 'a') ? 'checked' : ''; ?> /> unité centrale  </label>
  </div>

  <div class="form-group">  
  <label><input type="radio" name="c5" value="b" <?php echo ($row['device_typ'] == 'b') ? 'checked' : ''; ?>  /> écran  </label>
  </div>

  <div class="form-group">  
  <label><input type="radio" name="c5" value="c" <?php echo ($row['device_typ'] == 'c') ? 'checked' : ''; ?>  /> clavier  </label>
  </div>

  <div class="form-group">  
  <label><input type="radio" name="c5" value="d" <?php echo ($row['device_typ'] == 'd') ? 'checked' : ''; ?>  /> souris </label>
  </div>

  <div class="form-group">
  <label><input type="radio" name="c5" value="e" <?php echo ($row['device_typ'] == 'e') ? 'checked' : ''; ?> /> équipement spéciale </label>