Преглед на файлове

first run at inserting data into db

development
mauirixxx преди 8 години
родител
ревизия
f471b921f1
променени са 1 файла, в които са добавени 4 реда и са изтрити 1 реда
  1. +4
    -1
      gw-insert.php

+ 4
- 1
gw-insert.php Целия файл

@@ -13,7 +13,10 @@ if ($droptype == 1){
$weap = mysqli_real_escape_string($con, $_POST['weapon']);
$itname = mysqli_real_escape_string($con, $_POST['itemname']);
$treasdate = mysqli_real_escape_string($con, $_POST['treasuredate']);
echo "SQL code to run: \"INSERT INTO `history` (historydate, charnameid, locationid, goldrec, itemreq, itemtype, itemattribute, itemrarity, itemname) VALUES ('$treasdate', $toonid, $locid, $gold, $req, $weap , $req, $rarity, '$itname');\"<BR />";
$sqlweapins = "INSERT INTO `history` (historydate, charnameid, locationid, goldrec, itemreq, itemtype, itemattribute, itemrarity, itemname) VALUES ('$treasdate', $toonid, $locid, $gold, $req, $weap , $req, $rarity, '$itname')";
if (!$result = $con->query($sqlweapins)){
die ('There was an error running the query [' . $con->error . ']');
}
} else if ($droptype == 2){
echo 'drop was a rare material!<BR />';
} else if ($droptype == 3){


Зареждане…
Отказ
Запис