diff --git a/gw-insert.php b/gw-insert.php index 8e2bcb9..8e8352a 100644 --- a/gw-insert.php +++ b/gw-insert.php @@ -2,10 +2,9 @@ include_once 'gw-connect.php'; $con = new mysqli(DATABASE_HOST, DATABASE_USER, DATABASE_PASS, DATABASE_NAME); //post data section -$droptype = mysqli_real_escape_string($con, $_POST['droptype']); //this will stay - -$rare = $_POST['gwdrop']; //this will all go away soon -echo 'If this worked then there will be a number here: ' . $rare . '
'; +$droptype = mysqli_real_escape_string($con, $_POST['droptype']); //this dictates if the drop was a weapon/rune/material +$locid = mysqli_real_escape_string($con, $_POST['location']); //this is `treasurelocation`.`treasureid` in the database echo 'The droptype variable is set to ' . $droptype . '
'; +echo 'The locid variable is set to ' . $locid . '
'; echo 'Return to data recording page'; ?> \ No newline at end of file diff --git a/gw-record.php b/gw-record.php index a93f251..bf730f3 100644 --- a/gw-record.php +++ b/gw-record.php @@ -23,6 +23,7 @@ while ($row = $result->fetch_array()){ } echo ' a '; if ($whatdropped == "1"){ + echo '
'; //code for white blue purple etc $sqlweaprare = "SELECT * FROM `listrarity` ORDER BY `rareid` ASC"; if (!$result = $con->query($sqlweaprare)){ @@ -71,6 +72,9 @@ if ($whatdropped == "1"){ echo ''; } echo ''; + echo ' and |code for gold dropped here| gold pieces. FYI, the loclink variable is set to '. $locid . ' '; + echo ''; + echo '

'; } else if ($whatdropped == "2"){ echo '
'; //code for what rare material dropped @@ -86,10 +90,25 @@ if ($whatdropped == "1"){ } echo ' '; echo ' and |code for gold dropped here| gold pieces. FYI, the loclink variable is set to '. $locid . ' '; - echo ''; + echo ''; echo '

'; } else if ($whatdropped == "3"){ - echo 'run rune code'; + echo '
'; + //code for what rune dropped + $sqlrune = "SELECT * FROM `listrunes` ORDER BY `runeid` ASC"; + if (!$result = $con->query($sqlrunes)){ + die ('There was an error running the query [' . $con->error . ']'); + } + echo 'rune of '; + echo ' and |code for gold dropped here| gold pieces. FYI, the loclink variable is set to '. $locid . ' '; + echo ''; + echo '

'; } else { echo '