From 50e7ad497816d3ac71fe3e278cf3af9e3f6f4f50 Mon Sep 17 00:00:00 2001 From: mauirixxx Date: Mon, 22 May 2017 16:25:37 -1000 Subject: [PATCH] escape hell --- gw-insert.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gw-insert.php b/gw-insert.php index ed34bfb..13dfd90 100644 --- a/gw-insert.php +++ b/gw-insert.php @@ -20,7 +20,7 @@ if ($droptype == 1){ } else if ($droptype == 2){ $runeid = mysqli_real_escape_string($con, $_POST['runeid']); $runerare = mysqli_real_escape_string($con, $_POST['runerarity']); - echo "SQL code should be \"INSERT INTO `history` (historydate, charnameid, locationid, goldrec, itemtype, itemrarity, runetype) VALUES ('$treasdate', $toonid, $locid, $gold, '16', $runerare, $runeid\"
"; + 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 rare material!
'; } else if ($droptype == 3){ echo 'drop was a rune!
';