Advertisement
tok124

store

Apr 20th, 2015
289
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.78 KB | None | 0 0
  1. <?php
  2. // Create connection
  3. $conn = mysqli_connect($host, $dbuser, $dbpass, $dbname);
  4. // Check connection
  5. if (!$conn) {
  6.     die("Connection failed: " . mysqli_connect_error());
  7. }
  8.  
  9. $sql = "SELECT item_entry, points FROM azer_items";
  10. $result = mysqli_query($conn, $sql);
  11.  
  12. if (mysqli_num_rows($result) > 0) {
  13.     // output data of each row
  14.     while($row = mysqli_fetch_assoc($result)) {
  15.         echo "<tr>";
  16.         echo "<td><input type='radio' name='item' value='" . $row['item_entry'] . "' required></td>";
  17.         echo "<td><a href='http://us.battle.net/wow/en/item/" . $row['item_entry'] .  "' target='_BLANK' rel='item=" . $row['item_entry'] . "'></a></td>";
  18.         echo "<td>" . $row['points'] . "</td>";
  19.         echo "<tr>";
  20.     }
  21. } else {
  22.     echo "0 results";
  23. }
  24.  
  25. mysqli_close($conn);
  26. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement