From 7f42e698e2a6bb8a58483d18d15b3bb6c9aa7acf Mon Sep 17 00:00:00 2001 From: mauirixxx Date: Tue, 23 May 2017 19:47:09 -1000 Subject: [PATCH] sql is fine, error is $toonid isn't being populated --- gw-insert.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/gw-insert.php b/gw-insert.php index 8754f29..55f4b34 100644 --- a/gw-insert.php +++ b/gw-insert.php @@ -20,10 +20,9 @@ if ($droptype == 1){ } else if ($droptype == 2){ $matid = mysqli_real_escape_string($con, $_POST['rarematerial']); $sqlmatins = "INSERT INTO `history` (historydate, charnameid, locationid, goldrec, material) VALUES (\"$treasdate\", $toonid, $locid, $gold, $matid)"; - /* if (!$result = $con->query($sqlmatins)){ + if (!$result = $con->query($sqlmatins)){ die ('There was an error running the query [' . $con->error . ']'); - } */ - echo $sqlmatins; + } } else if ($droptype == 3){ $runeid = mysqli_real_escape_string($con, $_POST['rune']); $runerare = mysqli_real_escape_string($con, $_POST['runerarity']);