connect_errno > 0){ die ('Unable to connect to database [' . $db->connect_errno . ']'); } echo '
'; echo 'At '; $sqlmaplocation = "SELECT `location`, `wikilink` FROM `treasurelocation` WHERE `treasureid` = $location"; if (!$result = $con->query($sqlmaplocation)){ die ('There was an error running the query [' . $con->error . ']'); } while ($row = $result->fetch_array()){ $locname = $row['location']; $loclink = $row['wikilink']; echo '
' . $locname . '
'; } echo ' a '; if ($whatdropped == "1"){ //code for white blue purple etc $sqlweaprare = "SELECT * FROM `listrarity` ORDER BY `rareid` ASC"; if (!$result = $con->query($sqlweaprare)){ die ('There was an error running the query [' . $con->error . ']'); } echo '
'; while ($row = $result->fetch_array()){ $rareid = $row['rareid']; $rarity = $row['rarity']; echo '
' . $rarity . '
'; } echo '
, '; //code for weapon attribute requirment $sqlweapreq = "SELECT * FROM `listreq` ORDER BY `req` ASC"; if (!$result = $con->query($sqlweapreq)){ die ('There was an error running the query [' . $con->error . ']'); } echo 'req
'; while ($row = $result->fetch_array()){ $reqid = $row['req']; echo '
' . $reqid . '
'; } echo '
'; //code for what attribute the weapon is (command, axe mastery, energy storage, etc $sqlweapattr = "SELECT * FROM `listattribute` ORDER BY `weapattrid` ASC"; if (!$result = $con->query($sqlweapattr)){ die ('There was an error running the query [' . $con->error . ']'); } echo '
'; while ($row = $result->fetch_array()){ $attrid = $row['weapattrid']; $weapattr = $row['weaponattribute']; echo '
' . $weapattr . '
'; //need to add a nested while loop, to preselect the weapon with the attribute, or somehow java it? An r9 Axe of Energy Storage combo doesn't exist. } echo '
'; //code for what the weapon is - staff, dagger, scythe, wand, sword, etc $sqlweaptype = "SELECT * FROM `listtype` ORDER BY `weaponid` ASC"; if (!$result = $con->query($sqlweaptype)){ die ('There was an error running the query [' . $con->error . ']'); } echo '
'; while ($row = $result->fetch_array()){ $typeid = $row['weaponid']; $weapon = $row['weapontype']; echo '
' . $weapon . '
'; } echo '
'; } else if ($whatdropped == "2"){ //code for what rare material dropped $sqlraremat = "SELECT * FROM `materials` ORDER BY `materialid` ASC"; if (!$result = $con->query($sqlraremat)){ die ('There was an error running the query [' . $con->error . ']'); } echo '
'; while ($row = $result->fetch_array()){ $matid = $row['materialid']; $raremat = $row['material']; echo '
' . $raremat . '
'; } echo '
'; } else if ($whatdropped == "3"){ echo 'run rune code'; } else { echo '
'; echo '
choose one
'; echo '
weapon
'; echo '
material
'; echo '
rune
'; echo '
'; exit; } echo ' and |code for gold dropped here| gold pieces'; echo '
'; echo 'Reload the page with no GET data?
RELOAD
'; ?>