diff --git a/gw-insert.php b/gw-insert.php index a66d8cd..0cdf55d 100644 --- a/gw-insert.php +++ b/gw-insert.php @@ -6,7 +6,6 @@ $con = new mysqli(DATABASE_HOST, DATABASE_USER, DATABASE_PASS, DATABASE_NAME); $gold = mysqli_real_escape_string($con, $_POST['droppedgold']); //how much gold dropped $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 -//$toonid = mysqli_real_escape_string($con, $_POST['chartoon']); //this is the id of the character doing the hunting $toonid = $_SESSION['playerid']; $treasdate = mysqli_real_escape_string($con, $_POST['treasuredate']); if ($droptype == 1){ @@ -21,7 +20,7 @@ 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)"; + $sqlmatins = "INSERT INTO `history` (historydate, charnameid, locationid, goldrec, material) VALUES ('$treasdate', $toonid, $locid, $gold, $matid)"; if (!$result = $con->query($sqlmatins)){ die ('There was an error running the query [' . $con->error . ']'); } @@ -36,5 +35,5 @@ if ($droptype == 1){ exit("Variable droptype was set to ($droptype)"); } echo '
'; -echo ''; +echo '