From d8f2fc6f3f3acac7aa17ce21199573c4dd58307e Mon Sep 17 00:00:00 2001 From: mauirixxx Date: Mon, 22 May 2017 16:35:02 -1000 Subject: [PATCH] actual rune db insertion test here we go! --- gw-insert.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/gw-insert.php b/gw-insert.php index b67fdb3..3132c5f 100644 --- a/gw-insert.php +++ b/gw-insert.php @@ -23,8 +23,10 @@ if ($droptype == 1){ $runeid = mysqli_real_escape_string($con, $_POST['runeid']); $runerare = mysqli_real_escape_string($con, $_POST['runerarity']); $runetype = mysqli_real_escape_string($con, $_POST['rune']); - echo "SQL code should be \"INSERT INTO `history` (historydate, charnameid, locationid, goldrec, itemtype, itemrarity, runetype) VALUES (\'$treasdate\', $toonid, $locid, $gold, \'16\', $runerare, $runeid)\"
"; - echo 'drop was a rune!
'; + $sqlruneins = "INSERT INTO `history` (historydate, charnameid, locationid, goldrec, itemtype, itemrarity, runetype) VALUES ('$treasdate', $toonid, $locid, $gold, '16', $runerare, $runeid)"; + if (!$result = $con->query($sqlruneins)){ + die ('There was an error running the query [' . $con->error . ']'); + } } else { echo 'No data was sent!
'; }