Ver Mensaje Individual
  #2 (permalink)  
Antiguo 04/04/2017, 19:59
JESUMINISTROSYMAS
(Desactivado)
 
Fecha de Ingreso: septiembre-2008
Ubicación: Maracay edo Aragua Venezuela
Mensajes: 48
Antigüedad: 15 años, 7 meses
Puntos: 3
Respuesta: Error en un select option

Un rayo de Luz me permitió solucionar, dejo el código corregido jeje funciona perfectamente.

Código PHP:
Ver original
  1. <select class="form-control input-sm" name="moneda" required>
  2.      <option value="">Select Country
  3.          <?php
  4.             //Get country list from Country master
  5.             $qry = "select name, symbol from  currencies order by name";
  6.             //Execute query
  7.             $result = mysqli_query($con, $qry);
  8.             //Assigned fetched array to $Country
  9. while($country = mysqli_fetch_array($result)){
  10.     //Compare User Country with country list. $row[4] is the country column in user table
  11.     if($row[name] == $country[symbol]){
  12.         echo "<option value='$country[symbol]' selected='selected'>$country[symbol]</option>";
  13.     }else{
  14.         echo "<option value='$country[symbol]'>$country[symbol]</option>";
  15.     }
  16. }
  17.          ?>
  18.       </option>
  19. </select>