Value not inserting / Dropzone.js Drag and Drop uploader
I’m lost… Using a working drag and drop (dropzone.js) from one site to another and can not get 1 value (kind) to be inserted into a record.
<?php
WA_DFP_SetupUploadStatusStruct("WA_UploadResult1");
if (!empty($_FILES)) {
WA_DFP_UploadFiles("WA_UploadResult1", "file", "0", "", "true", $WA_UploadResult1_Params);
}
?>
<?php
if (!empty($_FILES)) {
$InsertQuery = new WA_MySQLi_Query($tgdesign_i);
$InsertQuery->Action = "insert";
$InsertQuery->Table = "posts";
$InsertQuery->bindColumn("image", "s", "".$WA_DFP_UploadStatus["WA_UploadResult1"]["serverFileName"] ."", "WA_DEFAULT");
$InsertQuery->bindColumn("kind", "i", "".$_SESSION['type'] ."", "WA_DEFAULT");
$InsertQuery->bindColumn("dateAdded", "t", "".((isset($_POST["hiddenDateTime"]))?$_POST["hiddenDateTime"]:"") ."", "WA_DEFAULT");
$InsertQuery->saveInSession("");
$InsertQuery->execute();
$InsertGoTo = "";
if (function_exists("rel2abs")) $InsertGoTo = $InsertGoTo?rel2abs($InsertGoTo,dirname(__FILE__)):"";
$InsertQuery->redirect($InsertGoTo);
}
?>
Forcing a value of 63 into a new record insert and WORKS:
$InsertQuery->bindColumn("kind", "i", "63", "WA_DEFAULT”);
But anything dynamic FAILs such as:
Taking the value from a URLQuery into a var: <?php $type = $_GET["type"]; ?>
$InsertQuery->bindColumn("kind", "i", "".$type ."", "WA_DEFAULT");
Or from a Recordset:
$InsertQuery->bindColumn("kind", "i", "".($rsType->getColumnVal("typeId")) ."", "WA_DEFAULT”);
Or from a Session value:
$InsertQuery->bindColumn("kind", "i", "".$_SESSION['type'] ."", "WA_DEFAULT”);
I've checked the DB to confirm it's an Integer column which is it. Not sure what else to check.