connect_errno > 0){ die ('Unable to connect to database [' . $db->connect_errno . ']'); } echo ''; echo '
At '; $sqlmaplocation = "SELECT * 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']; $locid = $row['treasureid']; echo '' . $locname . ' (Guild Wars Wiki link)'; } echo '
'; if ($whatdropped == "1"){ echo '
'; echo 'on a '; //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 ', '; //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'; //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 ''; //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 ' called the '; echo ' and gold pieces.'; echo ''; echo ''; echo '

'; } else if ($whatdropped == "2"){ echo '
'; echo 'on a '; //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 ' '; echo ' and gold pieces.'; echo ''; echo ''; echo '

'; } else if ($whatdropped == "3"){ echo '
'; echo 'on a '; echo ' '; //code for what rune dropped $sqlrune = "SELECT * FROM `listrunes` ORDER BY `runeid` ASC"; if (!$result = $con->query($sqlrune)){ die ('There was an error running the query [' . $con->error . ']'); } echo 'rune of '; echo ' and gold pieces.'; echo ''; echo ''; echo '

'; } else if ($whatdropped == "4"){ echo '
'; echo 'on nothing dropped! Maybe try again in 30 days on: ' . date('Y-m-d', strtotime("+30 days")); echo ''; echo ''; echo ''; echo '

'; } else { echo '
'; echo ''; echo ''; echo '
'; } ?>