Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- // Create connection
- $conn = mysqli_connect($host, $dbuser, $dbpass, $dbname);
- // Check connection
- if (!$conn) {
- die("Connection failed: " . mysqli_connect_error());
- }
- $sql = "SELECT item_entry, points FROM azer_items";
- $result = mysqli_query($conn, $sql);
- if (mysqli_num_rows($result) > 0) {
- // output data of each row
- while($row = mysqli_fetch_assoc($result)) {
- echo "<tr>";
- echo "<td><input type='radio' name='item' value='" . $row['item_entry'] . "' required></td>";
- echo "<td><a href='http://us.battle.net/wow/en/item/" . $row['item_entry'] . "' target='_BLANK' rel='item=" . $row['item_entry'] . "'></a></td>";
- echo "<td>" . $row['points'] . "</td>";
- echo "<tr>";
- }
- } else {
- echo "0 results";
- }
- mysqli_close($conn);
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement