<?php

  if( $_POST['action'] == 'New' ){

    $Position   = '../';
    require_once($Position.'config/config.php');
    require_once($Position.'config/conexion.php');

  }else{

  }

  //CatalogoMarcas
  $Query = "
    SELECT
      mar.Id, mar.Clave, mar.Nombre
    FROM CatalogoMarcas mar
    WHERE mar.Id != '0'
    ORDER BY mar.Nombre ASC
  ";
  $Marcas = $mysqli->query($Query);

?>
<div class="ItemOpc row form-group">

  <div class="col-sm-6">
    <select name="Marcas[]" class="form-control chosen-select">
      <option value=""></option>
      <?php
        mysqli_data_seek($Marcas, 0);
        while($Marca = mysqli_fetch_array($Marcas)) {
      ?>
        <option
          <?php if($Mar[Fk_Marca] == $Marca[Clave] ){ echo "selected='selected'"; } ?>
          value="<?php echo $Marca['Clave']; ?>"
        >
          <?php echo $Marca['Nombre'];?>
        </option>
      <?php } ?>
    </select>
  </div>
  <div class="col-sm-3">
    <button type="button" class="DelItemOpc btn btn-sm btn-danger"><i class="fa fa-times"></i></button>
  </div>

</div>
