Advertisement
Guest User

Untitled

a guest
Aug 21st, 2017
154
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.48 KB | None | 0 0
  1. <div class="form-group col-md-4">
  2. <label>Size and CD</label>
  3. <div class="field form-inline">
  4. <input autocomplete="off" class="input form-control" id="field1" name="prof1" type="text" placeholder="Type something" data-items="8" />
  5. <button id="b1" class="btn add-more" type="button">+</button>
  6. </div>
  7. </div>
  8. <div class="form-group col-md-4">
  9. <label>Quality</label>
  10. <div class="selectQuality form-inline">
  11. <select class="form-control" id="selectQuality" name="selectQuality">
  12. <?php
  13. $servername = "localhost";
  14. $username = "root";
  15. $password = "";
  16. $dbname = "my_animelist";
  17.  
  18. // Create Connection
  19. $conn = mysqli_connect($servername, $username, $password, $dbname);
  20.  
  21. // Check connection
  22. if (!$conn) {
  23. trigger_error("Connection failed: " . mysqli_connect_error());
  24.  
  25. }
  26. //Run Query
  27. $stmt = "SELECT DISTINCT `genre` FROM `genre` WHERE 1";
  28. $result = mysqli_query($conn,$stmt) or die(mysqli_error($conn));
  29. while(list($category) = mysqli_fetch_row($result)){
  30. echo '<option value="'.$category.'">'.$category.'</option>';
  31. }
  32.  
  33. mysqli_close($conn);
  34. ?>
  35. </select>
  36. <button id="b1" class="btn add-more-selectQuality" type="button">+</button>
  37. </div>
  38. </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement