Guest User

Untitled

a guest
May 23rd, 2018
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.00 KB | None | 0 0
  1. CategoryId UserId CategoryName tipo
  2. 73 1 Salario 10
  3. 74 1 Comisiones 10
  4. 75 1 Horas extra 12
  5. 76 1 Bono 10
  6. 77 2 Salario 10
  7. 78 2 Comisiones 10
  8. 79 2 Horas extra 12
  9. 80 2 Bono 10
  10.  
  11. $conexion = mysqli_connect("localhost", "root", "pass", "mi_base");
  12.  
  13. $query = "select distinct category.CategoryId, category.CategoryName from
  14. category where tipo = 10";
  15. $mResult = mysqli_query($conexion,$query);
  16.  
  17. <select name="ecategory" class="form-control">
  18. <?php while($col =
  19. mysqli_fetch_assoc($mResult )){ ?>
  20. <option value="<?php echo $col['CategoryId'];?>">
  21. <?php echo $col['CategoryName'];?>
  22. </option>
  23. <?php } ?>
  24. </select>
  25. </div>
Add Comment
Please, Sign In to add comment